Live data from Hacker News

HTTP Status 418 – I'm a teapot

developer.mozilla.org

71–80 of 114 posts

Re: HTTP Status 418 – I'm a teapot

#72
post #46

For those who may not know, this comes from RFC 2324: ""Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) , The RFC was published 1 April 1998 (April Fool's Day). There's a long history of humorous RFCs published on 1 April. For example, RFC 1149 "IP over Avian Carriers" https://en.wikipedia.org/wiki/IP_over_Avian_Carriers List of Additional April Fool's RFCs https://en.wikipedia.org/wiki/April_Fools%27_Day_Request…

To toot my own horn, I did an April Fool’s status code RFC: 397 Tolerating, for when a client sends a flawed request, but you’re going to tolerate it because you know what they really meant: https://pastebin.com/TPj9RwuZ

April Fools RFCs are part of the "Independent Stream", which mean the top left would say "Independent Submission", not IETF. Also, Informational, not Standards Track. Just FYI :)

Re: HTTP Status 418 – I'm a teapot

#73

I'm personally of the opinion that 418 shouldn't be considered a joke response, but would actually useful as 418 "Unsupported Device". What response should a printer give if you asked it to send a fax, but you have a base-model printer that doesn't support sending faxes. From the perspective of the printer, I know what you want (i.e. not a 404) and you've asked for it correctly (i.e. not 400 or 401 or 403), but I can…

I'd probably use a 422 in that case. I think 422 errors are underused, and can good for communicating errors when a client requests something which doesn't make sense from a business context.

Re: HTTP Status 418 – I'm a teapot

#74
post #67
post #64

Earlier quoted context omitted.

I think the idea behind 418, as much as there was an idea beyond a joke, was to indicate you sent your request to a teapot instead of a server. So yeah, client error for why it's not 518 instead. But it works in this example for "client did something weird I don't understand", so still client error - something akin to a 404, "client tried to go somewhere I don't understand".

Yes, exactly, I wasn't excluding 418 in saying all 4xx are errors in the client's request. But 'client did something weird I don't understand' is a 400, 405, something; not the same as 'this cannot happen' at all.

But it's the clients fault for trying to communicate with a teapot. There's nothing wrong inside the teapot. You just tried to communicate with a teapot. That's silly. Here's a 418 for you.

Re: HTTP Status 418 – I'm a teapot

#75
post #67

Earlier quoted context omitted.

Yes, exactly, I wasn't excluding 418 in saying all 4xx are errors in the client's request. But 'client did something weird I don't understand' is a 400, 405, something; not the same as 'this cannot happen' at all.

But it's the clients fault for trying to communicate with a teapot. There's nothing wrong inside the teapot. You just tried to communicate with a teapot. That's silly. Here's a 418 for you.

Again, yes, I am not saying 418 is wrong to be 4xx, I am including it in 'the entire 4xx range are client errors'.

Re: HTTP Status 418 – I'm a teapot

#77

Some previous discussions on this status specifically: https://hn.algolia.com/?q=418 Some fun ones: - Discussion on the status itself: https://news.ycombinator.com/item?id=24206899 - NPM proxy users receiving ERR 418 I'm a teapot: https://news.ycombinator.com/item?id=17175960 - Reserve the 418 status code: https://news.ycombinator.com/item?id=15004907

Thanks! I merged your list and mine to come up with:

Error 418 – I'm a Teapot - https://news.ycombinator.com/item?id=25282286 - Dec 2020 (14 comments)

I’m A Teapot – HTTP status code 418 - https://news.ycombinator.com/item?id=24206899 - Aug 2020 (118 comments)

HTTP 418: I'm a Teapot - https://news.ycombinator.com/item?id=22215285 - Feb 2020 (9 comments)

HTTP 418 I'm a Teapot - https://news.ycombinator.com/item?id=17652557 - July 2018 (39 comments)

Http status 418 at overstock.com - https://news.ycombinator.com/item?id=17529017 - July 2018 (2 comments)

NPM proxy users receiving ERR 418 I'm a teapot - https://news.ycombinator.com/item?id=17175960 - May 2018 (252 comments)

Reserve the 418 status code - https://news.ycombinator.com/item?id=15004907 - Aug 2017 (115 comments)

HTTP Error Code 418 I'm a Teapot is about to be removed from Node - https://news.ycombinator.com/item?id=14987460 - Aug 2017 (42 comments)

Google teapot error - https://news.ycombinator.com/item?id=14275583 - May 2017 (12 comments)

HTTP status code 418 (I'm a teapot) - https://news.ycombinator.com/item?id=13354835 - Jan 2017 (3 comments)

Ask HN: What's a good coffee pot for implementing the 418 protocol? - https://news.ycombinator.com/item?id=10659595 - Dec 2015 (2 comments)

Google's HTTP 418 Response - https://news.ycombinator.com/item?id=8269538 - Sept 2014 (2 comments)

Service for Generating Different HTTP codes. (418 I'm a teapot) - https://news.ycombinator.com/item?id=7383566 - March 2014 (3 comments)

HTTP Status Code 418 - https://news.ycombinator.com/item?id=7046027 - Jan 2014 (4 comments)

I'm a teapot - https://news.ycombinator.com/item?id=3511781 - Jan 2012 (29 comments)

HTTP Status 418 I'm a teapot - https://news.ycombinator.com/item?id=2221505 - Feb 2011 (33 comments)

HTTP Error 418: "I'm a teapot" - https://news.ycombinator.com/item?id=235856 - July 2008 (2 comments)

Re: HTTP Status 418 – I'm a teapot

#78
post #40

Earlier quoted context omitted.

Any links to APIs that implement a 418 HTTP response code?

If I have anything to do with it, there is a 418 response hidden somewhere. I recall a few internal projects at a previous employer would return 418 if the user managed to royally mess something up as a "wtf, how are you here?!" kind of response. I feel like I am not alone in implementing 'weird' HTTP codes when I get bored / as an easter egg. Pretty sure I also used HTTP 420 at least once.

“Uhh ummm no” -code reviewer

Re: HTTP Status 418 – I'm a teapot

#80
post #40

Earlier quoted context omitted.

Any links to APIs that implement a 418 HTTP response code?

If I have anything to do with it, there is a 418 response hidden somewhere. I recall a few internal projects at a previous employer would return 418 if the user managed to royally mess something up as a "wtf, how are you here?!" kind of response. I feel like I am not alone in implementing 'weird' HTTP codes when I get bored / as an easter egg. Pretty sure I also used HTTP 420 at least once.

Ah, the good ol' 420 - EnhanceYourCalm
Post reply on HN