3 ms·
>Which is not to say you are wrong if you return a 400 5XX - Server did something wrong 4XX - Client system did something wrong 2XX - Everything worked IMHO
by treis 4y ago
>Which is not to say you are wrong if you return a 400
5XX - Server did something wrong
4XX - Client system did something wrong
2XX - Everything worked
IMHO, what's missing is a code for "All systems worked but the user did something wrong" for scenarios like looking up a non existent ID or if their CC details don't work.
- thr0wawayf00 4y agoI've always interpreted 422 to fit this case: a well-formed request that cannot be processed due to the content in the payload. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422 https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422
- zinekeller 4y agoUnfortunately, literal reading of 422 implies that the sent content has error(s) and not the header. It's close, but I still feel that for GET requests it's wrong.
- deleted 4y ago[deleted]