summary refs log tree commit diff
path: root/synapse/api/errors.py
diff options
context:
space:
mode:
authorMichael Telatynski <7t3chguy@gmail.com>2022-02-14 19:28:00 +0000
committerGitHub <noreply@github.com>2022-02-14 19:28:00 +0000
commit54e74f8bde4ff02d6cb9acb3de11a0186af96d43 (patch)
tree020ee3bad37be8fecf66424a3bad77386257e016 /synapse/api/errors.py
parentNote when unstable MSC3283 prefixes will be removed (#11989) (diff)
downloadsynapse-54e74f8bde4ff02d6cb9acb3de11a0186af96d43.tar.xz
Fix M_WRONG_ROOM_KEYS_VERSION error not including `current_version` field (#11988)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Diffstat (limited to 'synapse/api/errors.py')
-rw-r--r--synapse/api/errors.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py
index 85302163da..e92db29f6d 100644
--- a/synapse/api/errors.py
+++ b/synapse/api/errors.py
@@ -406,6 +406,9 @@ class RoomKeysVersionError(SynapseError):
         super().__init__(403, "Wrong room_keys version", Codes.WRONG_ROOM_KEYS_VERSION)
         self.current_version = current_version
 
+    def error_dict(self) -> "JsonDict":
+        return cs_error(self.msg, self.errcode, current_version=self.current_version)
+
 
 class UnsupportedRoomVersionError(SynapseError):
     """The client's request to create a room used a room version that the server does