summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorPatrick Cloke <patrickc@matrix.org>2020-09-11 08:30:36 -0400
committerPatrick Cloke <patrickc@matrix.org>2020-09-11 08:30:36 -0400
commita9dbe98ef93b46758af4f583eeee0fd3e56fa1a4 (patch)
tree6b1f7dfb16897fe543d937624aa19d8e171381de /synapse/util
parentMake `StreamToken.room_key` be a `RoomStreamToken` instance. (#8281) (diff)
parentClarify changelog. (diff)
downloadsynapse-a9dbe98ef93b46758af4f583eeee0fd3e56fa1a4.tar.xz
Merge tag 'v1.20.0rc3' into develop
Synapse 1.20.0rc3 (2020-09-11)
==============================

Bugfixes
--------

- Fix a bug introduced in v1.20.0rc1 where the wrong exception was raised when invalid JSON data is encountered. ([\#8291](https://github.com/matrix-org/synapse/issues/8291))
Diffstat (limited to 'synapse/util')
-rw-r--r--synapse/util/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/util/__init__.py b/synapse/util/__init__.py
index b2355700ad..60ecc498ab 100644
--- a/synapse/util/__init__.py
+++ b/synapse/util/__init__.py
@@ -28,7 +28,7 @@ logger = logging.getLogger(__name__)
 
 def _reject_invalid_json(val):
     """Do not allow Infinity, -Infinity, or NaN values in JSON."""
-    raise json.JSONDecodeError("Invalid JSON value: '%s'" % val)
+    raise ValueError("Invalid JSON value: '%s'" % val)
 
 
 # Create a custom encoder to reduce the whitespace produced by JSON encoding and