diff options
author | Matthew Hodgson <matthew@matrix.org> | 2017-12-18 01:52:46 +0000 |
---|---|---|
committer | Hubert Chathi <hubert@uhoreg.ca> | 2018-08-12 19:14:31 -0400 |
commit | 0abb205b47158a4160ddceb317c0245d640b6e3f (patch) | |
tree | cfe46cf961a5da41fec5c59f18bebe519a7d17ea /synapse/api/errors.py | |
parent | make /room_keys/version work (diff) | |
download | synapse-0abb205b47158a4160ddceb317c0245d640b6e3f.tar.xz |
blindly incorporate PR review - needs testing & fixing
Diffstat (limited to 'synapse/api/errors.py')
-rw-r--r-- | synapse/api/errors.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py index 8c97e91ba1..d37bcb4082 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py @@ -289,9 +289,14 @@ 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, code=403, msg="Wrong room_keys version", current_version=None, - errcode=Codes.WRONG_ROOM_KEYS_VERSION): - super(RoomKeysVersionError, self).__init__(code, msg, errcode) + 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 def error_dict(self): |