diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-09-03 09:37:44 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-09-03 09:37:44 +0100 |
commit | 112c7ea315bdf341fc56a190138c290a5b7acffc (patch) | |
tree | 7bede512c6bff2de9ea9f5dbf364a17d4e202a9d /synapse/api | |
parent | Merge branch 'ratelimiting' into develop (diff) | |
download | synapse-112c7ea315bdf341fc56a190138c290a5b7acffc.tar.xz |
Set status message for ratelimit error responses
Diffstat (limited to 'synapse/api')
-rw-r--r-- | synapse/api/errors.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py index 23ce0af277..ad79bc7ff9 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py @@ -39,6 +39,7 @@ class CodeMessageException(Exception): super(CodeMessageException, self).__init__("%d: %s" % (code, msg)) self.code = code self.msg = msg + self.response_code_message = None def error_dict(self): return cs_error(self.msg) @@ -107,6 +108,7 @@ class LimitExceededError(SynapseError): errcode=Codes.LIMIT_EXCEEDED): super(LimitExceededError, self).__init__(code, msg, errcode) self.retry_after_ms = retry_after_ms + self.response_code_message = "Too Many Requests" def error_dict(self): return cs_error( |