EMZETT.
Login

HTTP 422 Unprocessable Content

In short: The request is syntactically correct but cannot be processed in terms of content.

In more detail: Unlike 400 the request is readable (e.g. valid JSON) but the values are invalid in terms of content: a required field is missing or a value is outside the allowed range. Many APIs use 422 for validation errors.

In Depth

When it occurs

  • A form with an invalid e-mail address or a password that is too short.
  • API call where a required field is missing.

What you can do

  1. Read the error message in the body, it usually names the affected field.
  2. Developers: return validation errors per field, not just one overall text.

See also: HTTP 400 Bad Request, HTTP Status Codes Overview, HTTP