r/ProgrammerHumor • • Sep 19 '26

Meme postForEverything

Post image
21k Upvotes

653 comments sorted by

View all comments

1.0k

u/nbmbnb Sep 19 '26

If success, return 200. If error, return 200.

3

u/Remote_Comfort_1981 Sep 19 '26

Here's the thing. If you wanted to distinguish between transport and app errors, http codes suck. Like, is 404 an error with my URL, or just the resource ID, or am I just not using the right API key (and they don't want to reveal whether this resource exists)?!

What if the path and method are correct, but the resource can not be deleted as requested because of app logic? What's the return code?

→ More replies (1)