summary refs log tree commit diff
path: root/synapse/api/errors.py
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2017-12-18 01:52:46 +0000
committerHubert Chathi <hubert@uhoreg.ca>2018-08-12 19:14:31 -0400
commit0abb205b47158a4160ddceb317c0245d640b6e3f (patch)
treecfe46cf961a5da41fec5c59f18bebe519a7d17ea /synapse/api/errors.py
parentmake /room_keys/version work (diff)
downloadsynapse-0abb205b47158a4160ddceb317c0245d640b6e3f.tar.xz
blindly incorporate PR review - needs testing & fixing
Diffstat (limited to 'synapse/api/errors.py')
-rw-r--r--synapse/api/errors.py11
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):