client error RFC 9110

HTTP 422 Unprocessable Entity

Request is syntactically valid but the data inside it is invalid — validation failed.

What it means

The distinction from 400: 400 means 'I can't parse your request'; 422 means 'I parsed it fine but the values fail my business rules'. For example, JSON parses cleanly but `age: -5` fails validation. Modern APIs (especially FastAPI, Rails, Laravel) use 422 for form validation errors and return the field-level errors in the body.

When servers send it

  • Field validation failed (email not a valid email, age negative)
  • Required business logic constraint violated
  • Cross-field validation failed (end date before start date)

What the client does

Shows field-level errors to the user based on the response body. Does not retry same request.

Common causes

  • Client-side validation missed something server-side validation caught

How to fix it

  • 1.Mirror server-side validation on the client for faster UX
  • 2.Read the JSON response — it usually lists the specific fields that failed
  • 3.For forms: highlight the failing fields with the server's error messages

Similar codes

← All HTTP status codes · HTTP status cheat sheet · HTTP headers reference