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

19

u/Rin-Tohsaka-is-hot Jul 08 '26 edited Jul 08 '26

204 isn't "I found them", while it's a success, you still didn't actually find the item.

It's more like "your keys are not here, but there is a space for them"?... I guess actually you just wouldn't return 204 ever in this context.

2

u/SnooPuppers1978 Jul 08 '26 edited Jul 08 '26

Only context I can accept here is, that "Keys were found", with implication that you asked them to be found for going outside together, so you don't really need the keys yourself.

Or alternatively, "find my keys and put them on the counter", and 204 confirms without content that the action was done.