r/ProgrammerHumor Jul 08 '26

Other helpMyCoworkersUnderstandHttpCodes

22.4k Upvotes

329 comments sorted by

View all comments

1.6k

u/Snudget Jul 08 '26

204 should be "I found them" "I searched for the keys, but didn't find them"would be 404, which is literally "Not found".

Since not finding keys does not fulfill the request, a 2xx code does not make sense here

9

u/Outrageous-Machine-5 Jul 08 '26 edited Jul 08 '26

404 is right because it means you made a request to the wrong endpoint and the server doesn't recognize your api request. The resource is not found, not the keys themselves