422 Unprocessable Content
I can read it. It just makes no sense.
What it properly means
The request was well formed but could not be followed because of semantic errors, such as failed validation.
- Class
- 4xx Client error: you fucked up
- Defined in
- RFC 9110, section 15.5.21
Get one yourself
This endpoint really answers with 422. Point your client at it and see what it does.
curl -i https://httpcodes.dev/api/422People mix this up with
-
Can't read it, or read it and it's wrong?
400 is for a request the server cannot even parse: broken JSON, bad framing. 422 is for one that parses fine but fails the rules, like a missing required field or an end date before the start date.