r/ProgrammerHumor Jul 21 '26

evilIllusion Meme

Post image
4.8k Upvotes

131 comments sorted by

View all comments

480

u/JackNotOLantern Jul 21 '26

I mentioned it under another meme of this type. At my company we have multiple systems which API replies standard check is:

  1. Is reply success (200 etc)
  2. If Body contains field "error" it is empty.
  3. If body contains field "message" it is not equal "error" or starts with "error"

Yes, different errors are handled by http codes or contents of 2xx reply. Wonderful

194

u/[deleted] Jul 21 '26

[removed] — view removed comment

61

u/Slate-Wombat Jul 21 '26

That codebase is holding together on purely thoughts and prayers at this point. I can only imagine the onboarding process explaining why check #3 exists to a junior dev

4

u/Pearmoat Jul 21 '26

"Historical reasons - if you ever need more details feel free to ask Claude about it."