4 ms·
That's like when I see APIs that give you responses with a 200 code, but then in the message there's a backend error.
by tecleandor 3y ago
That's like when I see APIs that give you responses with a 200 code, but then in the message there's a backend error.
- FridgeSeal 3y agoLooks pointedly at graphQL projects.
- smashed 3y agoSome people treat http as a pure transport/network layer and the actual body as the app-level layer. In such an approach, any http-level error would be a network, server maintenance or other unknown/fatal error type of things. App errors are encoded in the response body in a app-defined way. It's not a completely bogus way of handling things, as long as it is perfectly consistent throughout the project and properly documented, which is rarely the case.
- wruza 3y agoThe opposite of that is people who try to loosely project the variety of error modes their app has to http status codes. You then print out a table of http code <-> actual meaning and try to outline ranges and messages you want to handle differently. On top of that, their backend may be down and you have to deal with bare reverse proxy statuses as well, which adds another dimension to that mess.