4224xx Client ErrorMedium

HTTP 422 Unprocessable Entity

Defined in RFC 4918

What Does HTTP 422 Mean?

The server understands the content type and syntax of the request, but it was unable to process the contained instructions due to semantic errors.

Common Causes

  1. 1Validation errors on form fields
  2. 2Business logic violations in submitted data
  3. 3Invalid field values despite correct format
  4. 4Missing required fields in a well-formed request

Impact

  • Form submission rejected with validation errors
  • API request rejected due to invalid data

Developer Fix

For web developers and application engineers

  1. 1Implement client-side validation to catch errors early
  2. 2Return specific field-level error messages
  3. 3Validate data against business rules before submitting

Server Admin Fix

For system administrators and DevOps engineers

  1. 1Review validation rules for correctness
  2. 2Log 422 errors with details for debugging
  3. 3Ensure error messages are helpful and specific

Frequently Asked Questions

When should I use 422 instead of 400?
Use 400 when the request is malformed (bad syntax, wrong content type). Use 422 when the request is well-formed but contains invalid data (e.g., email field has invalid format, required field is empty).
How should I structure 422 error responses?
Return a JSON body with field-level error details, e.g., {"errors": {"email": ["must be a valid email"], "name": ["is required"]}}. This helps clients display specific validation feedback.

Related HTTP Status Codes

About the Author

Web Infrastructure Team

Verified against official RFC specifications and real-world server configurations. HTTP status code behavior confirmed across Apache, Nginx, and Cloudflare.