diff options
author | Erik Johnston <erik@matrix.org> | 2018-10-19 15:48:59 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2018-10-19 15:48:59 +0100 |
commit | 056f0991262902e22f0414e17c01198e1606384a (patch) | |
tree | fa365dc1aef28f86499122d8b9176c03dd95e863 /synapse/api/errors.py | |
parent | Batch process handling state groups (diff) | |
parent | Fix manhole on py3 (pt 2) (#4067) (diff) | |
download | synapse-056f0991262902e22f0414e17c01198e1606384a.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/purge_state_groups
Diffstat (limited to 'synapse/api/errors.py')
-rw-r--r-- | synapse/api/errors.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py index 2e7f98404d..48b903374d 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py @@ -59,6 +59,7 @@ class Codes(object): RESOURCE_LIMIT_EXCEEDED = "M_RESOURCE_LIMIT_EXCEEDED" UNSUPPORTED_ROOM_VERSION = "M_UNSUPPORTED_ROOM_VERSION" INCOMPATIBLE_ROOM_VERSION = "M_INCOMPATIBLE_ROOM_VERSION" + WRONG_ROOM_KEYS_VERSION = "M_WRONG_ROOM_KEYS_VERSION" class CodeMessageException(RuntimeError): @@ -312,6 +313,20 @@ class LimitExceededError(SynapseError): ) +class RoomKeysVersionError(SynapseError): + """A client has tried to upload to a non-current version of the room_keys store + """ + def __init__(self, current_version): + """ + Args: + current_version (str): the current version of the store they should have used + """ + super(RoomKeysVersionError, self).__init__( + 403, "Wrong room_keys version", Codes.WRONG_ROOM_KEYS_VERSION + ) + self.current_version = current_version + + class IncompatibleRoomVersionError(SynapseError): """A server is trying to join a room whose version it does not support.""" |