HTTP 422 Unprocessable Content

Status code 422 · Class 4xx

HTTP

Unprocessable Content

Also searched as: error 422, HTTP 422, 422 unprocessable entity, 422 unprocessable content

HTTP request chain from browser through CDN and proxy to the origin server
HTTP errors: find which hop in the request chain failed and read its logs.

What it means

The server understood the request format but the data inside is invalid, so it could not process it. APIs and frameworks such as Rails, Laravel and FastAPI return 422 for validation errors like a missing required field or a wrong data type.

Applies to: REST APIs, Rails, Laravel, FastAPI

How to fix HTTP 422 Unprocessable Content

  1. Read the response body; it usually lists the fields that failed validation
  2. Check required fields, formats (emails, dates) and value ranges against the API documentation
  3. Make sure the Content-Type header matches the body (for example 'application/json' with valid JSON)
  4. Check for type mismatches such as sending a string where a number is expected
  5. For Rails and Laravel forms, an expired CSRF token can also surface as a 422 or 419 response; reload the form
  6. If you own the API: return structured, field-level error messages so clients can fix the input

Why it happens

Defined in RFC 9110 (formerly 'Unprocessable Entity' in WebDAV), 422 signals well-formed but semantically invalid content. It is the standard validation-failure response in many frameworks.

FAQ

What is the difference between 400 and 422?

400 means the request itself is malformed. 422 means the syntax is fine but the content does not pass validation.

Related errors

Source: IANA HTTP Status Code Registry · fixes written and reviewed by the editors (see our editorial policy)

Last updated: