News for hackers. Stuff that matters.
Re:API Practices If You Hate Your Customers by jayd16 on Thursday December 12, 2019 @04:24AM (#21770512)
>but meaningful error messages and meaningful status codes aren't even remotely mutually exclusive

They actually are. Things besides your app code can response with 404 and 503 but not your error body. 4XX and 5XX bodies must be parsed more carefully and cannot be assumed to have a consistent structure with the same level of trust a 200 response would.

Http codes are nice but it makes api error parsing much more complex so there are some trade offs.

There are no comments on this comment yet.