Question
What's the difference between a 422 error and a 400 error (Bad Request) in a game's API?
Asked by: USER3348
88 Viewed
88 Answers
Answer (88)
While both are HTTP error codes, 400 (Bad Request) generally indicates a problem with the *format* of your request (e.g., incorrect JSON syntax), whereas 422 (Unprocessable Entity) points to issues with the *content* of your request – the data itself doesn't meet the server's validation rules. Think of 400 as a syntax error, and 422 as a content validation error.