summary refs log tree commit diff
path: root/synapse
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <dawagner@gmail.com>2015-12-14 13:50:50 +0000
committerDaniel Wagner-Hall <dawagner@gmail.com>2015-12-14 13:50:50 +0000
commit338c0a8a69096c188f4739c235f74a072a62e92f (patch)
tree97e11d8f38c9380fc020fecbd041596e72ab29df /synapse
parentMerge pull request #438 from matrix-org/markjh/fix_search_sql (diff)
downloadsynapse-338c0a8a69096c188f4739c235f74a072a62e92f.tar.xz
Include errcode on Internal Server Error
Diffstat (limited to '')
-rw-r--r--synapse/http/server.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py
index c44bdfc888..1b936b6892 100644
--- a/synapse/http/server.py
+++ b/synapse/http/server.py
@@ -15,7 +15,7 @@
 
 
 from synapse.api.errors import (
-    cs_exception, SynapseError, CodeMessageException, UnrecognizedRequestError
+    cs_exception, SynapseError, CodeMessageException, UnrecognizedRequestError, Codes
 )
 from synapse.util.logcontext import LoggingContext, PreserveLoggingContext
 import synapse.metrics
@@ -127,7 +127,10 @@ def request_handler(request_handler):
                     respond_with_json(
                         request,
                         500,
-                        {"error": "Internal server error"},
+                        {
+                            "error": "Internal server error",
+                            "errcode": Codes.M_UNKNOWN,
+                        },
                         send_cors=True
                     )
     return wrapped_request_handler