3 ms·
Wow, 452 upvotes and 89 downvotes on your answer. Very controversial, indeed! While I agree with you, I sometimes misuse 200 OK even for actual errors. Most ti
by matsemann 4y ago
Wow, 452 upvotes and 89 downvotes on your answer. Very controversial, indeed!
While I agree with you, I sometimes misuse 200 OK even for actual errors. Most times because whatever internal library I've used to do the requests have made it hard to parse the error data if it happens (just throws a general exception instead when it encounters a 4XX or 5XX). Or sometimes because the request failing is somewhat expected, but the client library then insists on doing lots of error handling when it fails (logging, alarms, circuit breakers and whatnot), polluting everything.