HTTP Status 418 – I'm a teapot
developer.mozilla.org
developer.mozilla.org
List of Additional April Fool's RFCs https://en.wikipedia.org/wiki/April_Fools%27_Day_Request_for...
4k+ results on Github: https://github.com/search?utf8=&q=http.StatusTeapot&type=Cod...; ~600 excluding _test.go files: https://github.com/search?q=http.StatusTeapot+-filename%3A*_...
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.
[1]: https://datatracker.ietf.org/doc/html/rfc6585#section-4
It will happen often if you try to make a call to their API through Google sheet scripts.
> ... indicates that the server refuses to brew coffee because it is, permanently, a teapot.
So I guess, when it is asked to perform coffee brewing? But pay close attention, to your general purpose brewer:
> A combined coffee/tea pot that is temporarily out of coffee should instead return 503.
At the firm I work at, one of my "10% time" projects was to build out a "warnings" field in the API response. There are often times that you want to say "this is not inherently wrong, but likely represents wrong assumptions upstream" or "you're asking for something that's obsolete and is now being silently ignored".
For example, if someone passes a currency field with the wrong number of decimal places. You might actually want to say your product costs $1.62346, but it's more likely you're not sanitizing your data and relying on non-guaranteed rounding behaviour to make it right.
The problem we have is that the most of the API fields are opt-in-- the people who could most use the warnings are unlikely to go in and activate them.
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
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)
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't do it, and this does not indicate an error on my part (not a 500 or 503). Thus, 418: Unsupported Device.
Perhaps this too much of an overlap with 404 (I don't have that resource) and 501 (I can't do that verb to that resource), which I assume is why there's not a huge need for it. But if we're going to have 418 exist and receive browser support anyway, it might as well have a useful meaning rather than just exist as a joke.
This interpretation is fully in keeping with the non-joke meaning of the original RFC, as a teapot is a device that does not support brewing coffee.
A perhaps-reasonable suggestion could be to use a 5xx range code that isn't specified. E.g. 555, or 567.
(But I'm not sure how it would ever not simply be a 500 - server thought it couldn't happen, it could and did, that's just a plain and simple error isn't it?)
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".
But 'client did something weird I don't understand' is a 400, 405, something; not the same as 'this cannot happen' at all.
Cleaned someone’s virus infected computer out. Plugged the network jack into the cable modem. Under 10 second and I had to start from scratch…
When work tells us they are blocking all external connections in data center, I can’t really argue even with how much work it is.
(Well, there's another reason for me to be pleased with having traded one of the family cars for an electric that charges at home ...)
If there is ever an Office Space 2, I think this is a candidate for the new fax machine.
It’s too perfect. It could only go downhill.
Office Space is great but the cubicles date it firmly in the 90s.
I had a cubicle almost identical to the ones in Office Space all the way up to 2011. If I ever had to return to an office, I’d much prefer that over any office desk I’ve had since.
We need coffee machines that shut up and serve coffee and don't do brand ads.