summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2015-01-22 17:38:53 +0000
committerDavid Baker <dave@matrix.org>2015-01-22 17:38:53 +0000
commitede491b4e0c14d44ce43dd5b152abf148b54b9ed (patch)
tree9393ce6b7beab8158fab5c958b8a957b7f1b1764 /synapse/http
parentAdd rest API & store for creating push rules (diff)
downloadsynapse-ede491b4e0c14d44ce43dd5b152abf148b54b9ed.tar.xz
Oops: second part of commit dc938606
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/server.py8
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)