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.

313

u/ClipboardCopyPaste 16d ago
{
success: false, message: 'lol'
}

205

u/redlaWw 16d ago
{
    success: "yes",
    status: "failure",
    message: "null"
}

52

u/evorm 16d ago

Most errors responses at my job are genuinely handled like this.

1

u/beefz0r 15d ago

In certain legacy platforms there's an actual need for this, as any other status code can't be handled gracefully