Some 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.
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.