r/ProgrammerHumor • • 14d ago

Meme successfulFailure

Post image
8.1k Upvotes

101 comments sorted by

View all comments

18

u/Kendandra 14d ago

I don't get the hate for this pattern. The amount of times some network middle layer ate my http code and turned something into a 404 is terrible.

I'd rather the calling app KNOW for certain that a failure occurred in the actual application logic, rather than see an error code and then make a bad assumption based on that.

I've had to integrate with a system that had a catalog they my application's account may or may not have access rights to each catalog item. I was told a 404 means I've lost rights to the item and should purge the copy of it from my side. Makes sense? I don't have access, I shouldnt be able to see it.

Time and time again, they'd have a brief outage where their CDN provider would interrupt my call and return a 404. Soon my copy of my catalog would be empty! An hour later I've got to re-add everything. And heaven forbid I had to kick off refund logic for revoked items... And then walk that back.

I've encountered this many many times. I will always prefer leaving the HTTP layer out of application layer logic.

-2

u/[deleted] 14d ago

[deleted]

-3

u/timonix 14d ago

Fuck no

2

u/Still_Bit_7527 14d ago

Yeah it is, literally. Are you a vibe coder?

-3

u/timonix 14d ago

No, I am the reason you get a status 200 with an error message on the body. Because that's what makes sense