422
MediumWeb Server

Unprocessable Content — the server understood the request but cannot apply its instructions

What 422 Means

The 422 error on the HTTP Status-Codes indicates unprocessable content — the server understood the request but cannot apply its instructions. This typically occurs due to json schema validation failed for the payload.

A 422 Unprocessable Content response indicates that the server successfully parsed the request syntax, understood the media type, and still rejected the payload because its meaning or data constraints were unacceptable. It is commonly used by APIs and form backends when the request body is well formed but semantically invalid. In practice, 422 often marks the boundary between transport-level parsing problems and application-level validation failures.

Technical Background

A 422 sits one layer deeper than a 400. The server is able to parse the request and understands what fields or objects were sent, but it still cannot accept the content as valid for the requested action.

That makes 422 especially common in JSON APIs, GraphQL-style mutations, and structured form submissions. It lets the application distinguish malformed input from well-formed input that fails validation, uniqueness checks, state rules, or domain constraints.

Common Causes

  • JSON schema validation failed for the payload
  • Required fields are present but semantically invalid
  • Field values violate business rules or constraints
  • Request contains conflicting or impossible data combinations

Typical Scenarios

  • An API receives valid JSON but one field contains an impossible value
  • A form submits all required fields, yet a business rule rejects the combination
  • A backend parses the payload successfully but fails domain validation

What to Know

A 422 is usually tied to the exact payload submitted rather than to service availability. If one request body returns 422 while another succeeds, the differentiator is usually field content, state constraints, or validation logic for that specific operation.

Frequently Asked Questions

Common questions about HTTP 422 error

A 400 usually means the server could not parse the request correctly. A 422 means the request was structurally valid, but the submitted content still failed application rules or validation.

It gives the API a clearer way to say that the payload was readable but unacceptable. That distinction is useful when clients need to separate malformed input from domain-level validation failures.

Yes. Valid JSON only means the payload can be parsed. The data inside it can still violate required formats, uniqueness rules, or state constraints and trigger a 422 response.

Related Error Codes