diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2017-11-13 18:35:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-13 18:35:24 +0000 |
commit | 781c15a6a30a15f350c462b830a74b943ee6ae49 (patch) | |
tree | 7b48d39b17a82fa3751f5429b77bd5f7803aa40f /synapse | |
parent | Revert "move _state_group_cache to statestore" (diff) | |
parent | Merge branch 'develop' into rav/invalid_request_utf8 (diff) | |
download | synapse-781c15a6a30a15f350c462b830a74b943ee6ae49.tar.xz |
Merge pull request #2663 from matrix-org/rav/invalid_request_utf8
Fix 500 on invalid utf-8 in request
Diffstat (limited to '')
-rw-r--r-- | synapse/http/servlet.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/http/servlet.py b/synapse/http/servlet.py index 8118ee7cc2..71420e54db 100644 --- a/synapse/http/servlet.py +++ b/synapse/http/servlet.py @@ -167,7 +167,8 @@ def parse_json_value_from_request(request): try: content = simplejson.loads(content_bytes) - except simplejson.JSONDecodeError: + except Exception as e: + logger.warn("Unable to parse JSON: %s", e) raise SynapseError(400, "Content not JSON.", errcode=Codes.NOT_JSON) return content |