gateway: ipld.ErrNotFound should result in a 404 #593
Labels
dif/expert
Extensive knowledge (implications, ramifications) required
effort/hours
Estimated to take one or several hours
P2
Medium: Good to have, but can wait until someone steps up
It's a somewhat rare case, but it's possible for a gateway backend to return
ipld.ErrNotFound
:--offline
in kuboIn those situations, kubo
v0.22.0
/ boxov0.11.0
would return a 404 in the gateway, but the implementation rework changed that to return a 500.See also https://github.com/ipfs/boxo/pull/440/files#r1297472794
I think 404 is the correct answer, as this is not a timeout while looking for content on the p2p network, or some missing link in an IPLD node (which would mean an incorrect request). It's a definitive answer that the content does not exist.
Optionally, another status code could be returned in some more specific situations (see #591), but 404 seem to be the correct default to me.
MichaelMure@d088e1e trivially change that returned status, with no other impact as far as I can tell.
The text was updated successfully, but these errors were encountered: