summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorNeil Johnson <neil@matrix.org>2018-08-15 16:28:30 +0100
committerNeil Johnson <neil@matrix.org>2018-08-15 16:28:30 +0100
commit4d1a8718b57390a8b6c2db8d2c8d836de1651b0b (patch)
treed1695c9c36bb475f3d63fea968e8b435890f803e /synapse/api
parentfix typo (diff)
parentMerge pull request #3653 from matrix-org/erikj/split_federation (diff)
downloadsynapse-neilj/update_limits_error_codes.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/update_limits_error_codes github/neilj/update_limits_error_codes neilj/update_limits_error_codes
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/errors.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py
index de8c4f4abc..832bb6ff6a 100644
--- a/synapse/api/errors.py
+++ b/synapse/api/errors.py
@@ -224,13 +224,9 @@ class NotFoundError(SynapseError):
 
 class AuthError(SynapseError):
     """An error raised when there was a problem authorising an event."""
-    def __init__(self, *args, **kwargs):
-        if "errcode" not in kwargs:
-            kwargs["errcode"] = Codes.FORBIDDEN
-        self.admin_uri = kwargs.get('admin_uri')
-        self.msg = kwargs.get('msg')
-        self.errcode = kwargs.get('errcode')
-        super(AuthError, self).__init__(*args, errcode=kwargs["errcode"])
+    def __init__(self, code, msg, errcode=Codes.FORBIDDEN, admin_uri=None):
+        self.admin_uri = admin_uri
+        super(AuthError, self).__init__(code, msg, errcode=errcode)
 
     def error_dict(self):
         return cs_error(