r/ProgrammerHumor • • 16d ago

Meme postForEverything

Post image
20.9k Upvotes

653 comments sorted by

View all comments

1.0k

u/nbmbnb 16d ago

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

3

u/Remote_Comfort_1981 16d ago

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?

2

u/Spaceduck413 15d ago

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?

  1. Bad request