HTTP Status Codes
Cluster focuses on debates about the proper use of HTTP status codes for error handling in web APIs and servers, criticizing misuse like 200 for errors or incorrect 4xx/5xx distinctions, and suggesting alternatives like 400, 410, 418, or 451.
Activity Over Time
Top Contributors
Keywords
Sample Comments
Not sure why they can't return a more appropriate HTTP code.
There's.... There is a whole.set of status codes for exactly those things!
Doesn't the correct use of HTTP status codes cover 99% of these cases?
You're saying some of the 404s should be 400s.
I’d prefer HTTP 442 “Oh no, not again.”
I wonder if they considered using the 451 status code.
Isn't that what 40x errors are for? E.g. I think there's 408 Bad Request for your POST example.
Have they never heard of codes other than 2xx and 4xx?
4xx errors are supposed to be client-side errors. 5xx is server-side. The purpose of the code doesn't match the spec.
Wouldn't "return 410" (potentially) be better?