summary refs log tree commit diff
path: root/synapse/api/errors.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2019-05-21 16:29:25 +0100
committerRichard van der Hoff <richard@matrix.org>2019-05-21 16:29:25 +0100
commit1c8f2c34ff41a2edb598e945d7e17b3884c50bc3 (patch)
treeb2383eca24fa5fe3c446d2f88379459dfeb53cf7 /synapse/api/errors.py
parentMerge branch 'develop' into matrix-org-hotfixes (diff)
parentIntroduce room v4 which updates event ID format. (#5217) (diff)
downloadsynapse-1c8f2c34ff41a2edb598e945d7e17b3884c50bc3.tar.xz
Merge branch 'develop' into matrix-org-hotfixes
Diffstat (limited to 'synapse/api/errors.py')
-rw-r--r--synapse/api/errors.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py

index ff89259dec..e91697049c 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py
@@ -328,9 +328,23 @@ class RoomKeysVersionError(SynapseError): self.current_version = current_version +class UnsupportedRoomVersionError(SynapseError): + """The client's request to create a room used a room version that the server does + not support.""" + def __init__(self): + super(UnsupportedRoomVersionError, self).__init__( + code=400, + msg="Homeserver does not support this room version", + errcode=Codes.UNSUPPORTED_ROOM_VERSION, + ) + + class IncompatibleRoomVersionError(SynapseError): - """A server is trying to join a room whose version it does not support.""" + """A server is trying to join a room whose version it does not support. + Unlike UnsupportedRoomVersionError, it is specific to the case of the make_join + failing. + """ def __init__(self, room_version): super(IncompatibleRoomVersionError, self).__init__( code=400,