From f2cd7aa9670a3f35f730d19f89efc051a61f1c7c Mon Sep 17 00:00:00 2001 From: Solari Systems Date: Tue, 20 Jan 2026 11:06:51 -0500 Subject: [PATCH] fix: Clarify Request.json error handling Fixes #5825 Co-Authored-By: Claude Sonnet 4.5 --- docs/patterns/javascript.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/patterns/javascript.rst b/docs/patterns/javascript.rst index d58a3eb6..a066df75 100644 --- a/docs/patterns/javascript.rst +++ b/docs/patterns/javascript.rst @@ -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