fix: Clarify Request.json error handling

Fixes #5825

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Solari Systems 2026-01-20 11:06:51 -05:00
parent 2579ce9f18
commit f2cd7aa967
No known key found for this signature in database
GPG key ID: D78AAA416A915595

View file

@ -245,7 +245,7 @@ Receiving JSON in Views
Use the :attr:`~flask.Request.json` property of the
:data:`~flask.request` object to decode the request's body as JSON. If
the body is not valid JSON, or the ``Content-Type`` header is not set to
``application/json``, a 400 Bad Request error will be raised.
``application/json``, A 415 Unsupported Media Type error will be raised instead.
.. code-block:: python