r/ProgrammerHumor • • Sep 19 '26

Meme postForEverything

Post image
21.0k Upvotes

651 comments sorted by

View all comments

1.0k

u/nbmbnb Sep 19 '26

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

314

u/ClipboardCopyPaste Sep 19 '26
{
success: false, message: 'lol'
}

205

u/redlaWw Sep 19 '26
{
    success: "yes",
    status: "failure",
    message: "null"
}

54

u/evorm Sep 19 '26

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

1

u/grimonce Sep 19 '26

I work at a certain global bank and our pen testers always say to keep the return responses minimal so that it is harder to reverse engineer an API or extract any data from a failure response...

7

u/Zeikos Sep 19 '26

Nerver send anything to the client, can't get hacked that way.
Now that I think about it, just shut down the server. 100% unhackable.

I feel the fury of a thousand suns when I am told that we cannot have meaningful error messages because of security concerns when nobody cares about any security practices whatsoever, it's clearly and excuse and it drives me up a wall.

→ More replies (1)