4xx Client Error

HTTP 422 Unprocessable Content

The server understands the content type and syntax of the request, but it was unable to process the contained instructions. Often used for semantic validation errors where the request is well-formed but logically invalid.

Common Causes

  • Validation errors on form fields (e.g., invalid email format)
  • Business logic violations (e.g., end date before start date)
  • Required fields present but containing invalid values
  • Semantic errors in a syntactically correct request

How to Fix

  1. 1Check the response body for specific validation error details
  2. 2Fix the data according to validation rules and resubmit
  3. 3Validate input on the client side before sending
  4. 4Review API documentation for field constraints

Example

HTTP 422 Unprocessable Content
POST /api/events HTTP/1.1
{ "start": "2024-12-31", "end": "2024-01-01" }

→ 422 Unprocessable Content
→ "End date must be after start date"

Related Client Error Codes