SiteError.comYour friendly guide to HTTP status codes
Status CodesBlog
  1. Home
  2. 4xx Client Error
  3. 422 Unprocessable Entity

422 Unprocessable Entity

🤔
422
Unprocessable Entity
!
?

Example HTTP Response

HTTP Response
HTTP/1.1 422 Unprocessable Entity
Content-Type: application/json

{"errors": {"email": "Invalid email format"}}
Common Causes
  • Validation errors in request body
  • Semantically incorrect data
  • Business logic validation failed
Technical Details

What does this mean?

I understand what you're saying, but it doesn't make sense! Like asking to schedule a meeting for February 30th.

Technical Definition

The request was well-formed but was unable to be followed due to semantic errors.

RFC Says

"The 422 (Unprocessable Entity) status code means the server understands the content type of the request entity (hence a 415 Unsupported Media Type status code is inappropriate), and the syntax of the request entity is correct (thus a 400 Bad Request status code is inappropriate) but was unable to process the contained instructions."

Plain English:

422 means 'I understood your request and it's syntactically correct, but it has semantic or validation errors.' For example, a properly formatted JSON request where the email field contains 'not-an-email' or a date field has an impossible value like February 30th.

Common Misinterpretation

The line between 400 and 422 is blurry. Generally, use 400 for syntax errors (malformed JSON, missing required fields) and 422 for semantic validation errors (invalid email format, business rule violations). However, many APIs just use 400 for all client errors.

View RFC Documentation
Code Snippets

Ready-to-use code for returning this HTTP status in your application:

Node.js
// Express.js
app.get('/example', (req, res) => {
  res.status(422).json({
    error: 'Unprocessable Entity',
    message: 'Your error message here'
  });
});

// Native HTTP
const http = require('http');

http.createServer((req, res) => {
  res.writeHead(422, { 'Content-Type': 'application/json' });
  res.end(JSON.stringify({
    error: 'Unprocessable Entity',
    message: 'Your error message here'
  }));
}).listen(3000);
When to Use This Code
  • Request is syntactically valid but fails semantic validation
  • Form field validation errors (invalid email, password too weak)
  • Business logic violations (date in past, negative quantity)
  • Use 400 for malformed requests that can't be parsed at all
Related Status Codes
🤨400Bad Request

422 Unprocessable Entity FAQ

What causes a 422 Unprocessable Entity error?

Validation errors in request body. Semantically incorrect data. Business logic validation failed.

When should I use 422 Unprocessable Entity?

Request is syntactically valid but fails semantic validation. Form field validation errors (invalid email, password too weak). Business logic violations (date in past, negative quantity). Use 400 for malformed requests that can't be parsed at all.

421 Misdirected Request423 Locked

Popular Status Codes

  • 200 OK
  • 301 Moved Permanently
  • 302 Found
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 500 Internal Server Error
  • 502 Bad Gateway
  • 503 Service Unavailable

Compare Codes

  • 401 vs 403
  • 301 vs 302
  • 404 vs 410
  • 500 vs 502
  • Compare any codes →

Categories

  • Informational
  • Success
  • Redirection
  • Client Error
  • Server Error
  • NGINX
  • Cloudflare
  • AWS ELB
  • Microsoft IIS

Tools

  • Cheat Sheet
  • Status Code Quiz
  • URL Checker
  • API Playground
  • Blog

© 2026 SiteError.com. All rights reserved.