HTTP 422 Unprocessable Content
HTTP 422 Unprocessable Content (formerly Unprocessable Entity) means the server understood the request and its format, but the data fails validation: a…
Quick answer
HTTP 422 Unprocessable Content (formerly Unprocessable Entity) means the server understood the request and its format, but the data fails validation: a missing required field, an invalid email, a negative quantity. It is the usual code for form and API validation errors.
Last updated · Maintained by FreeAIToolz · How we test
What does HTTP 422 Unprocessable Content mean?
The request parsed successfully, so 400 is too vague. Rails, Laravel and FastAPI return 422 for validation failures by default. The body should list each invalid field and why.
| Status code | 422 |
|---|---|
| Name | Unprocessable Content (formerly Unprocessable Entity) |
| Class | 4xx Client Error |
| Defined in | RFC 9110 §15.5.21 |
| Cacheable by default | No, unless Cache-Control says so |
| Safe to retry automatically? | No: change the request first |
What causes HTTP 422?
- Business-rule or schema validation failed on otherwise well-formed input.
How do I fix HTTP 422?
- Return field-level errors, for example {"errors": {"email": ["is invalid"]}}.
- Validate on the client too for faster feedback.
What should a client do after HTTP 422?
Show the field errors, fix the data and resubmit.
Does HTTP 422 affect SEO?
No SEO impact.
Example 422 response
HTTP/1.1 422 Unprocessable Content
Date: Mon, 01 Dec 2026 12:00:00 GMT
Content-Type: application/json
{"error":{"status":422,"message":"Unprocessable Content"}} How to return 422 Unprocessable Content in code
Express (Node.js)
res.status(422).json({ error: 'Unprocessable Content' }); Next.js route handler
return Response.json({ error: 'Unprocessable Content' }, { status: 422 }); FastAPI (Python)
raise HTTPException(status_code=422, detail="Unprocessable Content") PHP
http_response_code(422); Nginx
location = /example {
return 422;
} Other 4xx status codes
The request contains an error or cannot be fulfilled as sent. Fix the request before retrying.
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 406 Not Acceptable
- 407 Proxy Authentication Required
- 408 Request Timeout
- 409 Conflict
- 410 Gone
- 411 Length Required
- 412 Precondition Failed
- 413 Content Too Large
- 414 URI Too Long
- 415 Unsupported Media Type
- 416 Range Not Satisfiable
- 417 Expectation Failed
- 418 I'm a teapot
- 421 Misdirected Request
- 423 Locked
- 425 Too Early
- 426 Upgrade Required
- 428 Precondition Required
- 429 Too Many Requests
- 431 Request Header Fields Too Large
- 451 Unavailable For Legal Reasons
- 499 Client Closed Request
Frequently asked questions
422 vs 400?
Why does FastAPI return 422?
Is 422 a client or server error?
Related
- 400 Bad Request HTTP 400 Bad Request means the server cannot process the request because of a client error, such as malformed .
- 409 Conflict HTTP 409 Conflict means the request conflicts with the current state of the resource.
- 415 Unsupported Media Type HTTP 415 Unsupported Media Type means the server will not accept the request body’s format, as stated by its C.
- Open the HTTP Status Codes Reference → Free, no signup.