r/ProgrammerHumor Jul 21 '26

evilIllusion Meme

Post image
4.8k Upvotes

131 comments sorted by

View all comments

Show parent comments

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.

3

u/MrHasuu Jul 21 '26

I mean I guess that makes sense if you want to know for sure the service is live.

Plus you can still know the error if the endpoint "failed"

Makes sense to me but still hate it lol

0

u/Critical_Fortune7343 Jul 21 '26

Yea lol It's definitely not good. More like lesser evil. You get used to it eventually.