Skip to content

Conversation

adityasah104
Copy link

Description

Clarifies the distinction between 415 and 400 error codes when using request.json, aligning the JavaScript patterns documentation with the API reference.

Changes

  • Updated "Receiving JSON in Views" section to specify:
    • 400 Bad Request: for invalid JSON body
    • 415 Unsupported Media Type: for missing/incorrect Content-Type header
  • Updated "Making a Request with fetch" section for consistency

Fixes

Fixes #5825

Checklist

  • Documentation updated
  • Changes align with existing API documentation

Distinguish between 415 Unsupported Media Type (wrong Content-Type)
and 400 Bad Request (invalid JSON body) to align with API documentation.

Fixes #58254
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document 415 on the receiving json section

1 participant