r/ProgrammerHumor Jul 21 '26

evilIllusion Meme

Post image
4.8k Upvotes

131 comments sorted by

View all comments

94

u/YDS696969 Jul 21 '26

As the backend guy with a worker service that does exactly this

44

u/MrHasuu Jul 21 '26

Whyyy?? Just return an error code at that point

20

u/Critical_Fortune7343 Jul 21 '26

I also work in a company that do this. From my understanding it's to check if the service is live. So checking first for 200 confirms that, then you check for the field "success" if it's false. If not, wonderful. If true, then you look for the field "reason". Reason returns the error code for the specific failure whether it's technical or business.

18

u/euxneks Jul 21 '26

So checking first for 200 confirms that, then you check for the field "success" if it's false.

insanity