3 ms·
FWIW, my policy is that 5xx codes are always bugs, or an infrastructure-level failure/refusal to serve. 4xx codes are processing errors, or application-level r
by quesera 6y ago
FWIW, my policy is that 5xx codes are always bugs, or an infrastructure-level failure/refusal to serve.
4xx codes are processing errors, or application-level refusals.
I end up borrowing 422 from WebDAV for a generic "Unprocessable Entity", with an error code (for API interpretation/reference lookup) and description (for user display, when appropriate) in the response body.
- bickeringyokel 6y agoYeah that's understandable when frameworks default everything to 500, that's often true, I just couldn't think of a more appropriate code to the specific example apparently there actually is a code for fraudulent payments so 402 code would be good.