diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-09-10 14:55:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 14:55:25 -0400 |
commit | b86764662b6058dc53dd7cef923b806dc28f3a53 (patch) | |
tree | 95aecaacde9a89fec3da0885c1d0d7c03f686028 /synapse/util/__init__.py | |
parent | Remove shared rooms info from upgrade/workers doc as it's still experimental ... (diff) | |
download | synapse-b86764662b6058dc53dd7cef923b806dc28f3a53.tar.xz |
Fix the exception that is raised when invalid JSON is encountered. (#8291)
Diffstat (limited to 'synapse/util/__init__.py')
-rw-r--r-- | synapse/util/__init__.py | 2 |
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 |