summary refs log tree commit diff
path: root/synapse/api
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-05 14:06:13 +0000
committerErik Johnston <erik@matrix.org>2015-02-05 14:06:13 +0000
commit4996398858c26b623d98320a60bd891c6c608418 (patch)
treed1f0646f53488933de7b96055e8b302ccb2372d0 /synapse/api
parentMerge pull request #47 from matrix-org/signature_failures (diff)
parentMerge branch 'develop' of github.com:matrix-org/synapse into federation_clien... (diff)
downloadsynapse-4996398858c26b623d98320a60bd891c6c608418.tar.xz
Merge branch 'federation_client_retries' of github.com:matrix-org/synapse into develop
Diffstat (limited to 'synapse/api')
-rw-r--r--synapse/api/errors.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py
index ad478aa6b7..5041828f18 100644
--- a/synapse/api/errors.py
+++ b/synapse/api/errors.py
@@ -39,7 +39,7 @@ class Codes(object):
     TOO_LARGE = "M_TOO_LARGE"
 
 
-class CodeMessageException(Exception):
+class CodeMessageException(RuntimeError):
     """An exception with integer code and message string attributes."""
 
     def __init__(self, code, msg):
@@ -227,3 +227,9 @@ class FederationError(RuntimeError):
             "affected": self.affected,
             "source": self.source if self.source else self.affected,
         }
+
+
+class HttpResponseException(CodeMessageException):
+    def __init__(self, code, msg, response):
+        self.response = response
+        super(HttpResponseException, self).__init__(code, msg)