diff options
author | Erik Johnston <erik@matrix.org> | 2015-05-26 16:03:32 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-05-26 16:03:32 +0100 |
commit | 6d1dea337b8ae64ddfe4c1627014d09963388b0d (patch) | |
tree | c5cefd5b0334185780ffa8d391cb2d2f70c003af /synapse/http/server.py | |
parent | Changelog (diff) | |
parent | changelog (diff) | |
download | synapse-6d1dea337b8ae64ddfe4c1627014d09963388b0d.tar.xz |
Merge branch 'release-v0.9.1' of github.com:matrix-org/synapse v0.9.1
Diffstat (limited to 'synapse/http/server.py')
-rw-r--r-- | synapse/http/server.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py index 93ecbd7589..73efbff4f2 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -17,7 +17,7 @@ from synapse.api.errors import ( cs_exception, SynapseError, CodeMessageException, UnrecognizedRequestError ) -from synapse.util.logcontext import LoggingContext +from synapse.util.logcontext import LoggingContext, PreserveLoggingContext import synapse.metrics from syutil.jsonutil import ( @@ -85,7 +85,9 @@ def request_handler(request_handler): "Received request: %s %s", request.method, request.path ) - yield request_handler(self, request) + d = request_handler(self, request) + with PreserveLoggingContext(): + yield d code = request.code except CodeMessageException as e: code = e.code |