3 ms·
> In the context of a web API, both "route not found" and "resource does not exist" should return a 404, but each should have a unique `code` in the body I for
by Izkata 3y ago
> In the context of a web API, both "route not found" and "resource does not exist" should return a 404, but each should have a unique `code` in the body
I forget if it was 404 or something else, but you should check if it actually works first. One of our sites did exactly as you suggest here, and it worked totally fine in development (django "runserver"), but didn't work in production (wsgi behind apache). Turned out with that HTTP code, apache was discarding the body.