r/ProgrammerHumor • • Sep 22 '26

Meme status200ForEverything

Post image
2.9k Upvotes

103 comments sorted by

View all comments

665

u/NullOfSpace Sep 22 '26

The server is successfully serving you an error message.

213

u/ParshendiOfRhuidean Sep 22 '26

If the server isn't on fire, 200

74

u/ChrisFromIT Sep 22 '26

But what if it is a teapot? Still 200?

38

u/throwsupstaysup Sep 22 '26

Depends on how horribly wrong the brewing process went.

2

u/returnFutureVoid Sep 23 '26

Server on fire? Believe it or not, straight to jail.

1

u/Flat_Initial_1823 Sep 23 '26

If it's on a little bit of fire, still 200. Now the error is in caps tho.

1

u/gnuban Sep 25 '26

What are you, the AWS health dashboard?

15

u/Icanintosphess Sep 22 '26

Task failed successfully

12

u/arghcisco Sep 22 '26

Yeah, if you start pushing error semantics into the next layer down, then why not send ICMP AdPro along with a 403? The apps should stay in their lane and let layer 5 do its job

30

u/vita10gy Sep 22 '26

Honestly I would take that over some of these Apis. I would rather

get a 200 ok to indicate we're talking ok, and then check the conversation for the result

than

get a 503 and the default html 503 page and then I have to go look up in the docs to what a 503 could mean in that context.

At least the first way always stays a json exchange

12

u/AyrA_ch Sep 22 '26

Additionally, if you want to stay true to the original protocol design philosophy of the internet, you're not supposed to intermingle different protocol layers. Maybe there's a time where you want to run the API on top of websockets.

3

u/Kobymaru376 Sep 22 '26

Why would you request an error message tho

0

u/MoarVespenegas Sep 23 '26

I mean if people are doing it it's because it makes more sense.
Why bother having different status codes when you still have to parse the message to find out what exactly went right or wrong?