422
4xx Client ErrorUnprocessable Entity
The request was well-formed but had semantic errors, common in form validation.
422 Unprocessable Entity means the syntax is fine - valid JSON, right Content-Type - but the data doesn't make sense to the server. It's the go-to code for validation failures: a required field is blank, an email is malformed, a value is out of range. Unlike 400, the request was parseable; it just didn't pass the rules.
About 4xx Client Error
The request has a problem the client needs to fix, like a bad URL, missing auth, or invalid input.
How to fix 422 Unprocessable Entity
- Read the response body - APIs usually list which fields failed.
- Fix validation issues: required fields, formats, value ranges.
- Confirm field names and types match what the API expects.