mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-06 09:04:11 -04:00
Fix the exception that is raised when invalid JSON is encountered. (#8291)
This commit is contained in:
parent
192e98111d
commit
b86764662b
6 changed files with 167 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue