summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Haines <mjark@negativecurvature.net>2015-12-16 11:26:55 +0000
committerMark Haines <mjark@negativecurvature.net>2015-12-16 11:26:55 +0000
commit5fc03449c8b78018bce4201826aa75d856da11d9 (patch)
tree330be8addd8afed2d936025c52345d535c75936a
parentMerge branch 'release-v0.12.0' into develop (diff)
parentInclude errcode on Internal Server Error (diff)
downloadsynapse-5fc03449c8b78018bce4201826aa75d856da11d9.tar.xz
Merge pull request #440 from matrix-org/daniel/ise
Include errcode on Internal Server Error
-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