422 Unprocessable Content
A 422 is the most informative rejection in the 4xx family. The server received your request, read it without difficulty, understood exactly what you were asking for, and then declined because something inside it broke a rule. Nothing is malformed and nothing is down. A value simply was not acceptable, and the response usually says which one.
Updated August 2026 · 7 min read
-
Written by
Andrian Valeanu
Founder of Pulsetic
Andrian Valeanu founded Pulsetic and, before it, Designmodo. Across 15-plus years he has shipped web products, design tools, and monitoring software teams around the world rely on.
-
Reviewed by
Ionut Caval
Technical reviewer
Ionut Caval reviews Pulsetic's technical guides for accuracy. He works hands-on with web servers, networking, and uptime monitoring day to day, and makes sure the causes and fixes here hold up in production.
The short version: Read the response body. A 422 almost always lists the fields that failed and the rules they broke, and frameworks like Laravel, Rails, and FastAPI return them in a structured errors object. Fix those values and resend. Check your Content-Type too, since sending the wrong one can make every required field appear to be missing.
Key takeaways
- 422 Unprocessable Content means the request was well-formed and the server understood it, but the contents failed a validation or business rule. The envelope was fine; what was inside it was not.
- This is the line between 422 and 400. A 400 means the server could not parse the request at all. A 422 means it parsed cleanly and then broke a rule, like valid JSON whose
emailfield is not an email address. - The status arrived as Unprocessable Entity in RFC 4918 for WebDAV and was renamed Unprocessable Content by RFC 9110 in 2022. Both names appear in the wild and mean the same thing.
- Almost every 422 carries the answer in its response body. Laravel, Rails, Symfony, and FastAPI all return field-level errors, so reading the body is usually faster than reading your own code.
- A 422 is deterministic. Resending the same payload produces the same result, so retry logic that treats it like a 5xx just adds load without ever succeeding.
- Error type
- HTTP 4xx client error
- Whose side
- Usually the request; sometimes a stricter rule than documented
- Fix difficulty
- Easy
- Common cause
- The request parsed but failed validation
How did you find out this time?
Pulsetic is website uptime monitoring. It checks your URL from outside your network as often as every 30 seconds, confirms any failure from another region, then emails you.
10 monitors free, email alerts on failure and recovery. No credit card.
What does 422 Unprocessable Content mean?
A 422 Unprocessable Content is an HTTP status code in the 4xx family, and it occupies a very specific place in the sequence of things a server does with a request. The syntax was valid, so parsing succeeded. The content type was one the server handles, so it knew how to read the body. It got as far as understanding the request completely, and only then refused, because the instructions inside could not be followed. RFC 9110 describes it as the server understanding the content type and the syntax being correct, but being unable to process the contained instructions. In everyday terms, that is validation: a required field is absent, a value is the wrong type, a string does not match the format the endpoint demands, or a business rule says no.
The code was introduced by RFC 4918 as part of WebDAV, under the name Unprocessable Entity, and RFC 9110 brought it into core HTTP in 2022 with the name Unprocessable Content. Both names are still printed by real tools, and they mean the same thing. Frameworks adopted it enthusiastically for validation failures, so Laravel, Rails, Symfony, and FastAPI all return 422 with a structured list of field errors, and FastAPI returns it for any failure of a Pydantic model, including path and query parameters rather than just the body. That convention is what makes the code so practical: the response nearly always names its own cause.
- 422
- HTTP status code
- 4xx
- Client-side error class
- 2022
- Renamed to Unprocessable Content in RFC 9110
How the 422 Unprocessable Content error appears
The wording changes depending on your browser, device, or server. Here is how this error commonly shows up:
422
Unprocessable Content
The request was understood but could not be processed.
422 Unprocessable Content422 Unprocessable EntityHTTP Error 422Error 422Unprocessable Entity422 validation failed
422 vs 400, 409 and 415
These four all reject the request, but they disagree about which part of it was unacceptable.
| Code | What it means | Who fixes it |
|---|---|---|
| 422 Unprocessable Content | The request parsed and was understood, but a value broke a validation or business rule. | Whoever sends the request, by correcting the offending value. |
| 400 Bad Request | The request could not be parsed at all: malformed syntax, bad framing, or an unreadable body. | Whoever sends the request, by fixing the structure rather than the values. |
| 409 Conflict | The request is valid in isolation but clashes with the current state, such as a duplicate value or a stale version. | Whoever sends the request, usually by re-reading the current state first. |
| 415 Unsupported Media Type | The server will not accept that content type at all, so it never tried to read the body. | Whoever sends the request, by sending a supported Content-Type. |
Where the request failed, and which code says so
These codes mark four different stages of handling a request, from unreadable through to conflicting with the current state.
| Code | Stage it fails at | Typical trigger |
|---|---|---|
400 Bad Request | Parsing: the request is unreadable | Malformed JSON, bad framing, oversized header |
422 Unprocessable Content | Validation: it parsed, a value broke a rule | Missing required field, wrong type, bad format |
409 Conflict | State: valid, but clashes with what exists | Duplicate unique value, stale version, concurrent edit |
500 Internal Server Error | Execution: the server itself failed | Unhandled exception, dependency down |
What causes 422 Unprocessable Content?
- A required field missing from the request body. This is the most common trigger and the one the response body is most likely to name outright.
- A value of the wrong type, such as a string where the schema expects an integer, or a null where the field is not nullable.
- A value in the right type but the wrong format: an address that is not a valid email, a date that does not match the expected pattern, or a string longer than the field permits.
- The wrong
Content-Typeheader, so the server parses the body into an empty model and then reports every required field as missing, which looks far more alarming than it is. - A query or path parameter failing validation rather than anything in the body, which is easy to overlook because attention naturally goes to the payload.
- A business rule rather than a schema rule: a quantity that exceeds available stock, a date range that ends before it starts, or a state transition the endpoint does not allow.
- A nested object or array shaped differently from what the endpoint expects, where the outer structure is valid and an inner one is not.
How to find the cause fast
- Read the response body first. A 422 from any mainstream framework contains the field names and the failed rules, and that is usually the whole answer.
- Confirm the
Content-Typematches what you are actually sending. A JSON body announced as form data is a classic source of a 422 that lists every field as missing. - Send a minimal request containing only the required fields with known-good values. If that succeeds, add fields back until the 422 returns and you have isolated the offender.
- Check the URL as well as the body, since path and query parameters are validated on many stacks and produce the same status code.
How 422 Unprocessable Content looks from the outside
A 422 is a normal HTTP response, so from outside the service looks entirely healthy: the connection opens, TLS completes, and a well-formed reply comes back fast. A basic up-or-down check will report the API up while every write is being rejected. The risk is sharpest after a deployment that tightens validation, because existing clients that were sending acceptable payloads yesterday start failing today, and nothing in the infrastructure looks wrong. Catching that needs a check that sends a realistic request to the endpoint and asserts the status code it expects, rather than one that only confirms the host answers.
To confirm the exact code a URL returns, or to re-test several at once after a fix, run them through the free bulk URL status checker.
How to fix 422 Unprocessable Content
If you are calling an API
- Read the response body and fix the fields it names. This resolves the majority of 422s without any further investigation.
- Verify the
Content-Typeheader matches the body you are sending, usuallyapplication/jsonfor a JSON payload. - Check every required field is present, correctly typed, and correctly formatted against the endpoint's documentation.
- Inspect query and path parameters too, since many frameworks validate them through the same layer and report failures the same way.
- Strip the request down to the minimum that should succeed, then add fields back one at a time until the error reappears.
- Do not retry the same payload. A 422 is deterministic and will fail identically every time, so a retry loop only adds load.
If you run the API
- Return field-level errors in the response body rather than a bare status code. A 422 that does not say what failed forces every caller to guess.
- Keep the distinction with 400 honest: use 400 when the request could not be parsed and 422 when it parsed and then failed a rule. Mixing them makes both less useful.
- Make sure your documented schema matches the validator that actually runs. A rule that is stricter than the documentation produces 422s that callers cannot diagnose.
- Treat tightening validation as a breaking change. Clients sending previously acceptable payloads will start failing, and they will have no way to know why unless you tell them.
- Log rejected payloads, with sensitive values redacted, so you can see whether a spike in 422s is one broken client or a rule that is too strict.
Still not fixed? Next steps
- Read the response body before anything else. Frameworks that return 422 nearly always include the field names and the rules they broke, which turns a vague failure into a specific one.
- Check the
Content-Typeyou are sending. An endpoint expectingapplication/jsonthat receives a form encoding may parse it into an empty model and report every required field as missing, which looks like a validation bug and is not. - Compare the payload against the schema field by field: required fields present, types correct, formats valid, enums within range, and nested objects shaped as the endpoint expects.
- Remember that query and path parameters are validated too. A 422 with no obvious problem in the body often turns out to be a parameter in the URL failing a type or range constraint.
- If the payload looks correct and still fails, the rule may be genuinely server-side: a validator that is stricter than its documentation, or a business rule that changed. That is a fix for whoever owns the endpoint.
Code & configuration
Copy-paste starting points. Replace example.com and the paths with your own, and test changes on staging before production.
A 422 that names its own cause
curl -i -X POST https://api.example.com/users \
-H "Content-Type: application/json" \
-d '{"name":"Ada","email":"not-an-email"}'
HTTP/1.1 422 Unprocessable Content
{"errors":{"email":["must be a valid email address"]}}
The wrong Content-Type makes every field look missing
# body is JSON but announced as form data
curl -X POST https://api.example.com/users \
-H "Content-Type: application/x-www-form-urlencoded" \
-d '{"name":"Ada"}'
# -> 422 listing name as required, because the body never parsed
Return 422 with field errors rather than a bare status
// the caller can act on this; a bare 422 leaves them guessing
http_response_code(422);
header("Content-Type: application/json");
echo json_encode([
"errors" => ["email" => ["must be a valid email address"]],
]);
How to prevent 422 Unprocessable Content
The dangerous 422 is the one that starts after a deploy tightens validation, because every existing client fails at once while the service itself looks perfectly healthy from outside. Pulsetic checks your website and endpoints from multiple locations every 30 seconds and alerts you by email, SMS, voice call, Slack, Discord, Telegram, or webhook the moment a URL stops returning the status code you expect. It measures what a real client receives, so an endpoint that begins rejecting valid requests does not go unnoticed until the support tickets arrive.
Learn how Pulsetic's uptime monitoring detects this from the outside, across 15+ locations.
Sources and further reading
The specifications and vendor documentation this guide is written from, plus deeper reading on the parts it only summarises.
Frequently asked questions
-
What does 422 Unprocessable Content mean?
It means the server received your request, parsed it without trouble, and understood exactly what you were asking, but could not carry it out because the contents broke a rule. A required field was missing, a value was the wrong type, or something failed a business rule. The request was structurally fine and semantically wrong, which is precisely what separates it from a 400.
-
What is the difference between 400 and 422?
A 400 means the server could not parse the request at all, so it never got as far as looking at the values. A 422 means parsing succeeded and validation then failed. Malformed JSON is a 400. Valid JSON with an invalid email address in it is a 422. Both are client errors, but 422 tells the caller far more, because it locates the problem inside the request rather than in its structure.
-
Why does my API return 422 when the JSON looks correct?
Check the
Content-Typeheader first. If the body is JSON but the header says something else, the server may parse it into an empty model and report every required field as missing, which makes a correct payload look completely wrong. After that, check query and path parameters, because many frameworks validate those through the same layer and return the same status code when the body was never the problem. -
Is 422 the same as Unprocessable Entity?
Yes. The code was introduced as Unprocessable Entity in RFC 4918, the WebDAV specification, and RFC 9110 renamed it to Unprocessable Content in 2022 when it moved into core HTTP. Many frameworks and log formats still print the older name. The status code and its meaning are unchanged, so the two names can be treated as interchangeable.
-
Should I retry a request that returned 422?
Not without changing it. A 422 is deterministic, so the same payload will fail the same validation every time, and a retry loop generates load without any chance of succeeding. This is the opposite of a 5xx, where the failure is server-side and may clear on its own, which is why retry policies should treat the two classes very differently.
-
Which frameworks return 422 by default?
Laravel returns 422 with an
errorsobject when validation fails on a JSON or XHR request. Rails uses it for unprocessable records, Symfony for constraint violations, and FastAPI returns it for any failure of Pydantic model validation, including path and query parameters. Because these frameworks all include structured field errors, the response body is usually the fastest route to the cause. -
Does a 422 affect SEO?
Effectively no, because a 422 belongs to API and form endpoints rather than to the public pages a search engine crawls. Googlebot sends
GETrequests to content URLs, which should return 200. The only way a 422 becomes an SEO problem is if a misconfiguration makes ordinary page requests return it instead of content, and that would be a serious functional bug well before it was a ranking one. -
Is it called Unprocessable Entity or Unprocessable Content?
Both names refer to the same status code. It arrived as Unprocessable Entity in RFC 4918, the WebDAV specification, and RFC 9110 renamed it to Unprocessable Content in 2022 when it folded the code into core HTTP. Plenty of frameworks and tools still print the older name, so seeing either in a log is normal. The meaning has not changed: the request parsed correctly and the server understood it, but the contents could not be processed.
-
Should my API return 422 or 400 for a validation failure?
Return 422 when the request was well-formed and readable and a value inside it broke a rule, and 400 when the request could not be parsed at all. A JSON body with a syntax error is a 400. A perfectly valid JSON body whose
emailfield is not an email address is a 422. Both are defensible in the sense that 400 is the generic client error, but 422 tells the caller something far more useful: the envelope was fine, look at what you put in it. -
Why does Laravel return 422 for form submissions?
Laravel's validator throws a
ValidationException, and for JSON or XHR requests the framework renders it as a 422 with anerrorsobject keyed by field name. Rails, Symfony, and FastAPI behave much the same way, and FastAPI in particular returns 422 for any request that fails Pydantic model validation. If you are getting an unexpected 422 from one of these, the response body already names the offending fields, so read it before changing anything. -
Should a client retry a 422?
Not unchanged. A 422 is deterministic: the same body will fail validation the same way every time, so a retry loop only generates load and can trip rate limits. Retrying makes sense only after the payload has been corrected. This is the opposite of a 5xx, which reflects a server-side failure that may well clear on its own.
-
Can a 422 come from something other than my request body?
Yes. Validation runs on everything the endpoint accepts, so a malformed query parameter, a path segment that fails a type constraint, or a header the endpoint validates can all produce a 422 while the body itself is fine. FastAPI is a good example, since it validates path and query parameters through the same model layer as the body and reports all of them in the same error structure.
Trusted by teams at companies around the world
-
Catch the next outage before your visitors do.
2-minute setup · Cancel any time
-
No credit card needed