From 112c7ea315bdf341fc56a190138c290a5b7acffc Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Wed, 3 Sep 2014 09:37:44 +0100 Subject: Set status message for ratelimit error responses --- synapse/api/errors.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'synapse/api/errors.py') 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( -- cgit 1.4.1