3 ms·
Feels like a strawman argument - returning a 200 with an error payload vs an opaque 404 are not the only options. If you need to differentiate between a techni
by perrygeo 4y ago
Feels like a strawman argument - returning a 200 with an error payload vs an opaque 404 are not the only options.
If you need to differentiate between a technical error and a business domain error, we have other tools: A whole list of 4xx errors can be used for slightly different semantics (400 for "Bad request", 422 for "Unprocessable entity", etc). And we can attach a response body to a response of any status code, not just a 200. I'd definitely try these tools first rather than break HTTP semantics.