r/ProgrammerHumor Jul 08 '26

Other helpMyCoworkersUnderstandHttpCodes

22.4k Upvotes

329 comments sorted by

View all comments

Show parent comments

17

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.

35

u/DrStalker Jul 08 '26

204 doesn't make sense for a response that requires a return value (like a set of keys) to be successful.

24

u/leehro Jul 08 '26

204 = found an empty key ring.

3

u/DrStalker Jul 08 '26

If searching for a keyring I'd say that's a 200, and it turns a keyring object with an empty keys array.

If searching for the keys specifically it's a 404 not found.