diff options
author | Richard van der Hoff <richard@matrix.org> | 2020-01-31 10:28:15 +0000 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2020-01-31 10:28:15 +0000 |
commit | 08f41a6f05f304f6a14ab0339cf7225ec3d9851b (patch) | |
tree | d0f637b76002098394f92ee866299076f18fbe83 /synapse/api | |
parent | s/get_room_version/get_room_version_id/ (diff) | |
download | synapse-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.py | 6 |
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, ) |