mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-22 21:49:25 -05:00
Include errcode on Internal Server Error
This commit is contained in:
parent
fde412b240
commit
338c0a8a69
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
|
|
||||||
from synapse.api.errors import (
|
from synapse.api.errors import (
|
||||||
cs_exception, SynapseError, CodeMessageException, UnrecognizedRequestError
|
cs_exception, SynapseError, CodeMessageException, UnrecognizedRequestError, Codes
|
||||||
)
|
)
|
||||||
from synapse.util.logcontext import LoggingContext, PreserveLoggingContext
|
from synapse.util.logcontext import LoggingContext, PreserveLoggingContext
|
||||||
import synapse.metrics
|
import synapse.metrics
|
||||||
@ -127,7 +127,10 @@ def request_handler(request_handler):
|
|||||||
respond_with_json(
|
respond_with_json(
|
||||||
request,
|
request,
|
||||||
500,
|
500,
|
||||||
{"error": "Internal server error"},
|
{
|
||||||
|
"error": "Internal server error",
|
||||||
|
"errcode": Codes.M_UNKNOWN,
|
||||||
|
},
|
||||||
send_cors=True
|
send_cors=True
|
||||||
)
|
)
|
||||||
return wrapped_request_handler
|
return wrapped_request_handler
|
||||||
|
Loading…
Reference in New Issue
Block a user