summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2020-01-31 10:28:15 +0000
committerRichard van der Hoff <richard@matrix.org>2020-01-31 10:28:15 +0000
commit08f41a6f05f304f6a14ab0339cf7225ec3d9851b (patch)
treed0f637b76002098394f92ee866299076f18fbe83 /synapse/api
parents/get_room_version/get_room_version_id/ (diff)
downloadsynapse-08f41a6f05f304f6a14ab0339cf7225ec3d9851b.tar.xz
Add `get_room_version` method
So that we can start factoring out some of this boilerplatey boilerplate.
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/errors.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py
index 1c9456e583..0c20601600 100644
--- a/synapse/api/errors.py
+++ b/synapse/api/errors.py
@@ -402,11 +402,9 @@ class UnsupportedRoomVersionError(SynapseError):
     """The client's request to create a room used a room version that the server does
     not support."""
 
-    def __init__(self):
+    def __init__(self, msg="Homeserver does not support this room version"):
         super(UnsupportedRoomVersionError, self).__init__(
-            code=400,
-            msg="Homeserver does not support this room version",
-            errcode=Codes.UNSUPPORTED_ROOM_VERSION,
+            code=400, msg=msg, errcode=Codes.UNSUPPORTED_ROOM_VERSION,
         )