422 Unprocessable Content
The HTTP status meaning the request body is in the right format and parses, but its contents cannot be acted on.
In more detail
Compared with 415 (wrong format) and 405 (wrong method), it tells the client to change its data. Older documents call it Unprocessable Entity.
Example
In the APIs course: The course service answers 422 to a task with an empty title.Related terms
- 415 Unsupported Media Type — The HTTP status meaning the server will not read the request body because it is in a format it does not accept.
- 400 Bad Request — The HTTP status meaning the request is malformed or asks for something outside what the API allows, such as a page size above the maximum.
- input validation — Checking that data from a user, file or caller is acceptable before using it, and rejecting or asking again if not.
Taught in
- HTTP Methods And Status Codes — Modern API Architecture: REST, GraphQL & gRPC