3 ms·
I think that in practice 4xx is (and ought to be) any error other than a fatal server side error. I really dislike it when, e.g., Ruby HTTP client libraries tr
by nchelluri 11y ago
I think that in practice 4xx is (and ought to be) any error other than a fatal server side error.
I really dislike it when, e.g., Ruby HTTP client libraries treat any non 2xx-3xx response as an exception.
If I'm wrong about this usage, like, say I have a REST endpoint that, when the client doesn't send bad data, but a request fails for some reason (upstream service rejected request), what kind of code is my endpoint supposed to return?
(I would say 4xx, and leave it at that, getting rid of the "client" part of "client error", and leaving 5xx for something like ISE, fatal error "maybe ain't your fault, or at all under your control, client-man!" But I'm happy to learn more.)