Live data from Hacker News

418 I’m a teapot

developer.mozilla.org

51–60 of 146 posts

Re: 418 I’m a teapot

#51
If you are bored you can read the discussion when _mnot_ tried removing 418 status code from different languages and implementations because it wasn't technically correct.

https://github.com/nodejs/node/issues/14644

https://github.com/golang/go/issues/21326

And someone even ended up making a website http://save418.com/

Re: 418 I’m a teapot

#52

I hate to be that guy, but just a reminder that if you’re implementing a production system - even if it’s an internal tool - please don’t return 418 as a joke unless you really are a teapot. As an SRE I’ve been on the receiving end of a broken system returning teapots over the weekend, and it’s not as funny then.

I don't get it. If the system is so broken it is returning some random http code then I don't see how returning some other random http code is better?

5xx indicates an error in the server, 4xx indicates a client error. So it's quite common for clients to handle them differently like retrying 5xx but not 4xx.

Re: 418 I’m a teapot

#53

I had Sonatype Nexus return to me once upon upload of an artifact. I was not impressed.

Other than the humor in it, makes you wonder why they'd pick 418. It does sometimes feel like some errors are missing from the http codes, prompting developers to either create their own, or repurpose some, like 418, where they feel relatively safe that it won't conflict with something. It never ceases to amaze how http status codes can be misused. My favorite is still the customer who had built a service that would…

There are definitely missing codes, which is why sometimes the WebDAV status additions get used in purported RESTful APIs—which is semantically wrong, but often carries a lot of helpful meaning. For example, things like 422: Unprocessable Content or 423: Locked are really helpful to convey meaning, but not available in plain HTTP.

Re: 418 I’m a teapot

#55
post #52

Earlier quoted context omitted.

I don't get it. If the system is so broken it is returning some random http code then I don't see how returning some other random http code is better?

5xx indicates an error in the server, 4xx indicates a client error. So it's quite common for clients to handle them differently like retrying 5xx but not 4xx.

Sure, but if the server is returning 418 by an error it is likely that it would return some other 4xx error instead of 5xx. 418 is irrelevant here, the server is rogue.

Re: 418 I’m a teapot

#56

I hate to be that guy, but just a reminder that if you’re implementing a production system - even if it’s an internal tool - please don’t return 418 as a joke unless you really are a teapot. As an SRE I’ve been on the receiving end of a broken system returning teapots over the weekend, and it’s not as funny then.

I handle all these special cases like 2xx_other, 3xx_other, 4xx_other and 5xx_other. I log the http code and the response in case I have to debug later. 4xx_other just means you shouldn't repeat the request, since the server thinks it is invalid.

Re: 418 I’m a teapot

#58
post #51

If you are bored you can read the discussion when _mnot_ tried removing 418 status code from different languages and implementations because it wasn't technically correct. https://github.com/nodejs/node/issues/14644 https://github.com/golang/go/issues/21326 And someone even ended up making a website http://save418.com/

This 418 stuff reminds me of a previous job where we had some arguments about putting emojis in our applications. I was against it and a coworker was for it. Like putting rocket ship emoji when an operation succeeds.

My main argument was that if you put things like that in your applications then people start having opinions about it and they want to discuss it and add more to certain places or remove from other places and bring it up when you are trying to discuss unrelated things.

The increase in communication is a big detriment in my opinion, especially if there is no user behavior tracking to see if those emojis actually improve any user-related metrics (this was a b2b application so we didn't do a lot of user tracking).

It wasn't even about professionalism or anything like that, just the fact that those kind of things are subjective (some people like, some don't, some don't notice, some like a lot and want more) created small-scale friction often enough that I was getting annoyed by it.

Re: 418 I’m a teapot

#59
post #49

Earlier quoted context omitted.

Now. I didn't know about the RFC. This is so good. I hope we can continue to advance this field with good humor, and good coffee.

There are quite some RFC with humor, most prominently probably RFC1149 and its extension RFC2549

It's even been updated[1] for IPv6, so no reason not to use it!

[1]: https://www.rfc-editor.org/rfc/rfc6214

Re: 418 I’m a teapot

#60

I hate to be that guy, but just a reminder that if you’re implementing a production system - even if it’s an internal tool - please don’t return 418 as a joke unless you really are a teapot. As an SRE I’ve been on the receiving end of a broken system returning teapots over the weekend, and it’s not as funny then.

We return 418s for captcha failures.

Surely that should be a 401 unauthorized?
Post reply on HN