4xx
422 Unprocessable Content
The request body is syntactically correct but contains semantic errors.
What is HTTP 422?
This status code, originally known as 'Unprocessable Entity' in WebDAV, indicates that the server understands the content type and the syntax of the request is correct, but it is unable to process the contained instructions. For example, well-formed JSON that fails business logic validation would trigger this response. It is widely used in REST APIs for validation errors where the data format is correct but the values are not.
Defined in RFC 9110
Common Causes
- Form or API input that is well-formed but fails validation rules, such as an invalid email address format
- Business logic violations like trying to set a start date after an end date
- Missing required fields in a structurally valid JSON payload
- Values outside acceptable ranges, such as negative quantities or dates in the past
How to Fix
- Read the response body for specific validation error messages and field-level details
- Correct the invalid values and resubmit the request
- Implement client-side validation to catch common issues before sending to the server
- Review the API documentation for field constraints, required fields, and acceptable value ranges