422
HTTP Web Protocol
Severity: ModerateWhat Does This Error Mean?
HTTP 422 Unprocessable Entity means the server understood the request and the format is correct, but the content inside the request has errors the server cannot process. This is different from 400 Bad Request — the structure is fine, but the values or logic are wrong. For users, this usually means a form has invalid input; for developers, it means validation rules have failed.
Affected Models
- All web browsers
- All web servers
- REST APIs
- Mobile apps
- Desktop applications
Common Causes
- Form field values fail server-side validation (e.g., invalid email format, missing required field)
- API request body contains values that violate business logic (e.g., negative quantity, future birthdate)
- Uploaded file is the wrong type or exceeds size limits
- JSON body is syntactically valid but contains semantically incorrect values
- Unique constraint violation — submitting a record that already exists
How to Fix It
-
Read the error message carefully — the website or app should explain which field has an invalid value.
A well-designed 422 response tells you exactly what went wrong — look for highlighted fields or an error summary.
-
Check all required fields in the form — an empty required field is a common cause of 422.
Some fields appear optional but are required by the server's validation rules.
-
Check that email addresses, phone numbers, and dates are in the correct format expected by the form.
A date formatted as MM/DD/YYYY when the server expects DD/MM/YYYY will fail validation.
-
If uploading a file, verify it is the correct file type and does not exceed the maximum size.
Common limits are 2 MB for profile pictures and 10 MB for document uploads — check the form instructions.
-
If registering an account, check whether the email or username is already taken.
A duplicate registration attempt often returns 422 Unprocessable Entity from modern APIs.
-
If you are a developer, return the specific validation errors in the 422 response body in a structured format.
Example: {"errors": {"email": "is already taken", "age": "must be 18 or older"}} — this gives the client clear guidance.
When to Call a Professional
HTTP 422 is usually caused by user input errors — review the error message provided in the response body for guidance. If you are a developer, ensure your API returns a clear error message body explaining exactly which field failed and why. If the 422 appears on a correctly filled form, contact the website's support team — it may be a server-side validation bug.
Frequently Asked Questions
What is the difference between HTTP 400 and HTTP 422?
HTTP 400 Bad Request means the request is malformed — the structure or syntax is wrong. HTTP 422 Unprocessable Entity means the request structure is fine, but the content fails validation rules. Think of 400 as a grammar error and 422 as a logical error — the sentence is grammatically correct but makes no sense.
Does HTTP 422 mean my data was saved?
No — a 422 response means the server rejected the data and did not save anything. You need to correct the invalid fields and resubmit for the data to be processed. Nothing changes on the server when a 422 is returned.
Why do some APIs use 400 and others use 422 for validation errors?
There is no universal standard — different API frameworks have different conventions. Many newer REST APIs use 422 specifically for validation failures to distinguish them from malformed request errors. Always check the API documentation to understand how that specific API uses HTTP status codes.