diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-01-28 17:29:30 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-01-28 17:29:30 +0000 |
commit | 9c61556504924a063e7739ba80122c8753aed50c (patch) | |
tree | a483e292dfe602f30be1f9f17266a1bd0f88552d /synapse/http/server.py | |
parent | Fix Formatting (diff) | |
parent | Merge pull request #36 from matrix-org/device_id_from_access_token (diff) | |
download | synapse-9c61556504924a063e7739ba80122c8753aed50c.tar.xz |
Merge branch 'develop' into client_v2_sync
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) |