diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-08-01 15:04:50 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-08-01 16:02:46 +0100 |
commit | 01e93f48ed3dd78fda45a37733251659af19dde3 (patch) | |
tree | d3ce5dd798f8432c73a116d9e5005aba06f70520 /synapse/api | |
parent | Refactor code for turning HttpResponseException into SynapseError (diff) | |
download | synapse-01e93f48ed3dd78fda45a37733251659af19dde3.tar.xz |
Kill off MatrixCodeMessageException
This code brings the SimpleHttpClient into line with the MatrixFederationHttpClient by having it raise HttpResponseExceptions when a request fails (rather than trying to parse for matrix errors and maybe raising MatrixCodeMessageException). Then, whenever we were checking for MatrixCodeMessageException and turning them into SynapseErrors, we now need to check for HttpResponseExceptions and call to_synapse_error.
Diffstat (limited to 'synapse/api')
-rw-r--r-- | synapse/api/errors.py | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py index 7476c90ed3..3568362389 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py @@ -70,17 +70,6 @@ class CodeMessageException(RuntimeError): self.msg = msg -class MatrixCodeMessageException(CodeMessageException): - """An error from a general matrix endpoint, eg. from a proxied Matrix API call. - - Attributes: - errcode (str): Matrix error code e.g 'M_FORBIDDEN' - """ - def __init__(self, code, msg, errcode=Codes.UNKNOWN): - super(MatrixCodeMessageException, self).__init__(code, msg) - self.errcode = errcode - - class SynapseError(CodeMessageException): """A base exception type for matrix errors which have an errcode and error message (as well as an HTTP status code). |