Open typhonius opened 7 months ago
A general rule of "empty response" == 404 might not be accurate to meet the expectation of REST specifications.
e.g. if it's a search endpoint POST /search
, a 200 response with an empty body or array is fine. However, if the endpoint explicitly ask for a specific resource GET /customers/{id}
, then it is expected to return 404 if that resource is not found.
Is your proposal related to a problem?
RESTified endpoints currently return 200 for every response in a manner congruent with the GraphQL specification rather than following REST rules which would preordain a 4xx response
Describe the solution you'd like
When an empty response is returned from Hasura via a RESTified endpoint, I would like it to return 404
This could be placed behind a feature flag or environment variable or made user configurable. This will help data access requests via Hasura and REST to align to expectations of API consumers