Hacker News new | past | comments | ask | show | jobs | submit login

Every time I have encountered this error code in the wild I have been extremely frustrated. Somebody tries to be cheeky, and rather than just return the proper status code (like a 429 or 503) they return this, which breaks a lot of HTTP status code parsing.

Not cheeky or funny. Boring actually. I know I'm boring but I have a job to do.




If your parser can't handle in-spec error codes, then that's a parser problem.


Regardless of the parser if you're using a 4XX status code when you should be using a 5XX status code then you're simply doing it wrong.


Honestly this discussion makes the occasional "I'm a teapot" seem useful. Your log and error handling ought to be capable of handling occurrences of a programmer doing something goofy.


Why would being a teapot justify being a 5xx status? The server hasn’t failed, it’s a functioning teapot, definitely not broken.

I would assume if the teapot were to be broken, then a 518 teacup is empty error would be more appropriate.

But as long as there is a piping hot cup of tea, then it’s a 418 code.

/s


A possibly apocryphal didactic story relevant because if an HTTP implementation misses 418, what else does it miss?:

The story goes that Van Halen had stipulated on their concert rider that they wanted M&M candy backstage, but with all the brown ones removed.

In his autobiography ‘Crazy From the Heat’ singer David Lee Roth explained this was not just a childish request, but in fact was a cunning test whereby he could tell instantly if the venue was safe or not.

He reasoned that if a concert venue did put brown M&Ms out, then they cannot have read the rider properly and that they then might also have made other more dangerous errors, such as in their electricity supply or stage weight capacity.

https://www.metaltalk.net/chris-dale-myth-busting-the-van-ha...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: