Merge pull request #4669 from matrix-org/erikj/log_exception

Cleanup top level request exception logging
This commit is contained in:
Erik Johnston 2019-02-18 16:41:41 +00:00 committed by GitHub
commit 028267acd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

1
changelog.d/4669.misc Normal file
View file

@ -0,0 +1 @@
Cleanup request exception logging

View file

@ -106,10 +106,10 @@ def wrap_json_request_handler(h):
# trace. # trace.
f = failure.Failure() f = failure.Failure()
logger.error( logger.error(
"Failed handle request via %r: %r: %s", "Failed handle request via %r: %r",
h, request.request_metrics.name,
request, request,
f.getTraceback().rstrip(), exc_info=(f.type, f.value, f.getTracebackObject()),
) )
# Only respond with an error response if we haven't already started # Only respond with an error response if we haven't already started
# writing, otherwise lets just kill the connection # writing, otherwise lets just kill the connection