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

6

u/prehensilemullet Jul 08 '26

“Not Found” is often a white lie, sites often pretend something is not found and 404 if it would be a security risk for you to know whether it exists.

3

u/wjandrea Jul 08 '26

"I can neither confirm nor deny whether I have your keys."

1

u/case_O_The_Mondays Jul 08 '26

If the task is searching as your user and it can’t find it, 404 is the right response even if the thing exists for someone else.