mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-19 12:33:56 +01:00
Merge pull request #440 from matrix-org/daniel/ise
Include errcode on Internal Server Error
This commit is contained in:
commit
5fc03449c8
1 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue