diff options
author | Neil Johnson <neil@matrix.org> | 2018-08-03 13:40:47 +0100 |
---|---|---|
committer | Neil Johnson <neil@matrix.org> | 2018-08-03 13:40:47 +0100 |
commit | 897c51d2742bead151a6306cd236b517982b8a69 (patch) | |
tree | 75f588d3949381a3d049eb5f192dba4ded09d0ec /synapse/http/server.py | |
parent | update generate_monthly_active_users, and reap_monthly_active_users (diff) | |
parent | Merge pull request #3645 from matrix-org/michaelkaye/mention_newsfragment (diff) | |
download | synapse-897c51d2742bead151a6306cd236b517982b8a69.tar.xz |
Merge branch 'develop' of github.com:matrix-org/synapse into neilj/mau_tracker
Diffstat (limited to 'synapse/http/server.py')
-rw-r--r-- | synapse/http/server.py | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py index 1940c1c4f4..6dacb31037 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -36,7 +36,6 @@ from synapse.api.errors import ( Codes, SynapseError, UnrecognizedRequestError, - cs_exception, ) from synapse.http.request_metrics import requests_counter from synapse.util.caches import intern_dict @@ -77,16 +76,13 @@ def wrap_json_request_handler(h): def wrapped_request_handler(self, request): try: yield h(self, request) - except CodeMessageException as e: + except SynapseError as e: code = e.code - if isinstance(e, SynapseError): - logger.info( - "%s SynapseError: %s - %s", request, code, e.msg - ) - else: - logger.exception(e) + logger.info( + "%s SynapseError: %s - %s", request, code, e.msg + ) respond_with_json( - request, code, cs_exception(e), send_cors=True, + request, code, e.error_dict(), send_cors=True, pretty_print=_request_user_agent_is_curl(request), ) |