Had manager that wanted us to return error codes on a field of an API response along with an HTTP 200 because “errors bad”. It needed a few of us to make him understand how that worked against common design patterns and you still had to handle error codes since you didn’t know if the error would be coming from the app, web server, api gateway, local network (no internet), etc.
The UPS tracking API has a similar issue, when it doesn’t find a tracking number it returns 200 and an API response with the not found error inside. The documentation even states that the API does return 404 in that case. A github issue about that mismatch is open for over a year already: https://github.com/UPS-API/api-documentation/issues/166
Classical error code 200
Had manager that wanted us to return error codes on a field of an API response along with an HTTP 200 because “errors bad”. It needed a few of us to make him understand how that worked against common design patterns and you still had to handle error codes since you didn’t know if the error would be coming from the app, web server, api gateway, local network (no internet), etc.
The UPS tracking API has a similar issue, when it doesn’t find a tracking number it returns 200 and an API response with the not found error inside. The documentation even states that the API does return 404 in that case. A github issue about that mismatch is open for over a year already: https://github.com/UPS-API/api-documentation/issues/166