422
Client Error
422 Unprocessable Entity
The server understands the content type but cannot process the contained instructions.
Description
422 Unprocessable Entity (originally WebDAV, now standardized in RFC 9110) indicates that the server understands the request content type and the syntax is correct, but it was unable to process the contained instructions due to semantic errors.
In REST APIs, this is the preferred code for validation errors: the request is syntactically valid JSON/XML but fails business logic validation (e.g. required field missing, value out of range, invalid email format).
Common Causes
- API request with valid JSON but failing field validation (required field missing, wrong type)
- Form submission with invalid data (invalid email, password too short)
- Business rule violation (booking date in the past, negative quantity)
- WebDAV operation with conflicting properties
How to Fix
- Return detailed validation errors per field in the response body
- Use a consistent error format:
{"errors": [{"field": "email", "message": "Invalid format"}]} - Differentiate between 400 (malformed syntax) and 422 (valid syntax, failed validation)
- Document all validation rules in API documentation
Check your website's HTTP status code
Check now →