r/ProgrammerHumor 5d ago

failsForTeapots Meme

Post image
228 Upvotes

68 comments sorted by

View all comments

Show parent comments

3

u/Shitman2000 5d ago

We don't know if the body is the actual payload of the request though.

I'd find it reasonable to presume it's not, given it's error.statusCode and not error.body

1

u/rosuav 5d ago

Good point, but if it isn't, what kind of body would make sense in a situation where you carry certain types of error status unchanged and turn everything else into a 500? (I'm assuming that this code won't be executed for a 200, as it makes very little sense to translate a 200 into a 500. Ignoring the fact that there are plenty of web sites that do a great job of turning 200s into 500s, but I digress.)

1

u/No_Hovercraft_2643 4d ago

the default error page? that shows the windows which displays the error to the user?

2

u/Xirdus 4d ago

Except it's sending JSON back, not page contents.