summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-09-10 14:55:25 -0400
committerGitHub <noreply@github.com>2020-09-10 14:55:25 -0400
commitb86764662b6058dc53dd7cef923b806dc28f3a53 (patch)
tree95aecaacde9a89fec3da0885c1d0d7c03f686028 /synapse/util
parentRemove shared rooms info from upgrade/workers doc as it's still experimental ... (diff)
downloadsynapse-b86764662b6058dc53dd7cef923b806dc28f3a53.tar.xz
Fix the exception that is raised when invalid JSON is encountered. (#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 3ad4b28fc7..a13f11f8d8 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