diff options
author | Travis Ralston <travpc@gmail.com> | 2018-10-15 14:44:32 -0600 |
---|---|---|
committer | Travis Ralston <travpc@gmail.com> | 2018-10-15 14:44:32 -0600 |
commit | f293d124b6494baba71c14591a265af551214d1c (patch) | |
tree | c2eabdc7431cd56f7a598e1915aa91da4f3f03b3 /synapse/api | |
parent | Update login terms structure for the proposed language support (diff) | |
parent | Merge pull request #4019 from matrix-org/dbkr/e2e_backups (diff) | |
download | synapse-f293d124b6494baba71c14591a265af551214d1c.tar.xz |
Merge branch 'develop' into travis/login-terms
Diffstat (limited to 'synapse/api')
-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.""" |