diff options
author | David Baker <dave@matrix.org> | 2015-01-22 17:38:53 +0000 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-01-22 17:38:53 +0000 |
commit | ede491b4e0c14d44ce43dd5b152abf148b54b9ed (patch) | |
tree | 9393ce6b7beab8158fab5c958b8a957b7f1b1764 /synapse/http/server.py | |
parent | Add rest API & store for creating push rules (diff) | |
download | synapse-ede491b4e0c14d44ce43dd5b152abf148b54b9ed.tar.xz |
Oops: second part of commit dc938606
Diffstat (limited to 'synapse/http/server.py')
-rw-r--r-- | synapse/http/server.py | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py index 8015a22edf..0f6539e1be 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -16,7 +16,7 @@ from synapse.http.agent_name import AGENT_NAME from synapse.api.errors import ( - cs_exception, SynapseError, CodeMessageException + cs_exception, SynapseError, CodeMessageException, UnrecognizedRequestError ) from synapse.util.logcontext import LoggingContext @@ -139,11 +139,7 @@ class JsonResource(HttpServer, resource.Resource): return # Huh. No one wanted to handle that? Fiiiiiine. Send 400. - self._send_response( - request, - 400, - {"error": "Unrecognized request"} - ) + raise UnrecognizedRequestError() except CodeMessageException as e: if isinstance(e, SynapseError): logger.info("%s SynapseError: %s - %s", request, e.code, e.msg) |