Re:Ask HN: Happy 404 Day. Whats your favorite 404 error page?
by bruce343434 on Thursday April 04, 2024 @02:18PM
(#39934039)
Yep, for that 204 (OK, but no results) exists. But if you serve a browser a page with 204 in the header, it refuses to render anything since 204 mandates an empty body, so the browser doesn't even look at it.
So, 404 would be used in case the database endpoint does not exist at the URL you tried to access it at. A query returning zero rows would be a "success" in HTTP terms.