From 338c0a8a69096c188f4739c235f74a072a62e92f Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Mon, 14 Dec 2015 13:50:50 +0000 Subject: Include errcode on Internal Server Error --- synapse/http/server.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'synapse/http') 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 -- cgit 1.4.1 From 2b0f8a948286424212e79b9ac5d22d5be6707f1f Mon Sep 17 00:00:00 2001 From: Daniel Wagner-Hall Date: Wed, 16 Dec 2015 17:59:44 +0100 Subject: Fix typo --- synapse/http/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'synapse/http') diff --git a/synapse/http/server.py b/synapse/http/server.py index 1b936b6892..682b6b379b 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -129,7 +129,7 @@ def request_handler(request_handler): 500, { "error": "Internal server error", - "errcode": Codes.M_UNKNOWN, + "errcode": Codes.UNKNOWN, }, send_cors=True ) -- cgit 1.4.1