Start free · Free tools · Fair usage limits
Browse Tools

Categories

Custom AI Solutions – AI2Flows
LIVE NEWS
Loading latest AI & SEO news…
Home›Tools›HTTP Status Codes Reference›HTTP 422 Unprocessable Content
4xx Client Error

HTTP 422 Unprocessable Content

HTTP 422 Unprocessable Content (formerly Unprocessable Entity) means the server understood the request and its format, but the data fails validation: a…

Quick answer

HTTP 422 Unprocessable Content (formerly Unprocessable Entity) means the server understood the request and its format, but the data fails validation: a missing required field, an invalid email, a negative quantity. It is the usual code for form and API validation errors.

Last updated · Maintained by FreeAIToolz · How we test

What does HTTP 422 Unprocessable Content mean?

The request parsed successfully, so 400 is too vague. Rails, Laravel and FastAPI return 422 for validation failures by default. The body should list each invalid field and why.

Status code422
NameUnprocessable Content (formerly Unprocessable Entity)
Class4xx Client Error
Defined inRFC 9110 §15.5.21
Cacheable by defaultNo, unless Cache-Control says so
Safe to retry automatically?No: change the request first

What causes HTTP 422?

  • Business-rule or schema validation failed on otherwise well-formed input.

How do I fix HTTP 422?

  1. Return field-level errors, for example {"errors": {"email": ["is invalid"]}}.
  2. Validate on the client too for faster feedback.

What should a client do after HTTP 422?

Show the field errors, fix the data and resubmit.

Does HTTP 422 affect SEO?

No SEO impact.

Example 422 response

HTTP/1.1 422 Unprocessable Content
Date: Mon, 01 Dec 2026 12:00:00 GMT
Content-Type: application/json

{"error":{"status":422,"message":"Unprocessable Content"}}

How to return 422 Unprocessable Content in code

Express (Node.js)

res.status(422).json({ error: 'Unprocessable Content' });

Next.js route handler

return Response.json({ error: 'Unprocessable Content' }, { status: 422 });

FastAPI (Python)

raise HTTPException(status_code=422, detail="Unprocessable Content")

PHP

http_response_code(422);

Nginx

location = /example {
    return 422;
}

Other 4xx status codes

The request contains an error or cannot be fulfilled as sent. Fix the request before retrying.

Frequently asked questions

422 vs 400?
400: the request is malformed or unparseable. 422: it parsed fine but the values are invalid.
Why does FastAPI return 422?
FastAPI validates request data with Pydantic. Missing or wrongly typed fields produce 422 with a detail array describing each error.
Is 422 a client or server error?
422 is in the 4xx class, so it is classed as a client error: the request needs to change before it can succeed.