DEV Community

Felippe Regazio
Felippe Regazio

Posted on • Updated on

418 HTTP Status Code: Im a teapot!

I was building an API, and consulting some http status codes when i saw the 418 status code on the MDN documentation.

418 I'm a teapot
The server refuses the attempt to brew coffee with a teapot.

And this is what the MDN says about it:

The HTTP 418 I'm a teapot client error response code indicates that the server refuses to brew coffee because it is a teapot. This error is a reference to Hyper Text Coffee Pot Control Protocol which was an April Fools' joke in 1998.

You can check the documentation here:

And here is the RFC:

Then i asked myself: WTF?
Most of you devs may already known this staus code and even its history, but many dont. So, there it goes:

"So, what’s the "418 I'm a teapot" all about? Well, the group of people who make these codes and set the standards is the IETF or "Internet Engineering Task Force". To propose new standards, the members release RFC’s or "Requests for Comments" to the community. Every year since 1989, they release a few humorous RFC’s for April’s Fool Day and on April 1st, 1998, RFC 2324 introduced the "Hyper Text Coffee Pot Control Protocol" or (HTCPCP/1.0). This was a brand new protocol for controlling, monitoring, and diagnosing coffee pots. Now, the RFC is pretty funny with lines like "Coffee pots heat water using electronic mechanisms, so there is no fire. (...) Now, you may be asking, if this is a COFFEE protocol, why the "teapot" code? This is answered in Section 2.3.2. in that "Any attempt to brew coffee with a teapot should result in the HTTP error code 418 I'm a teapot and the resulting entity body MAY be short and stout". And just like that the "418 I’m a teapot" code was born! Since then, it's been used in all sorts of wacky ways. Google even referred to "418" as a different error in their 2013 April Fool's Joke "Google Nose" saying that "418: Scent transfer protocol error" indicates system congestion; please try again later".


So, its just a joke.
Personally, i found it very cool ;P

Top comments (11)

nickytonline profile image
Nick Taylor

This API for HTTP error codes always cracks me up.

Check out their HTTP 418 error code. 😸

felipperegazio profile image
Felippe Regazio

OMG, the is awesome hahahaha. I loved the 100, 204, 401, also 418 ;P

nickytonline profile image
Nick Taylor

Not related to your post, but since you liked the API,Todd Motto has a great repository for public APIs

GitHub logo public-apis / public-apis

A collective list of free APIs for use in software and web development.

Public APIs Build Status

A collective list of free APIs for use in software and web development.


A public API for this project can be found here - thanks to DigitalOcean for helping us provide this service!

For information on contributing to this project, please see the contributing guide.

Please note a passing build status indicates all listed APIs are available since the last update. A failing build status indicates that 1 or more services may be unavailable at the moment.


Thread Thread
felipperegazio profile image
Felippe Regazio

really nice. thank you!

sphanley profile image
Sam Hanley (he/him)

Here's one famous case where it wasn't a joke:

ERR! 418 I'm a teapot (this is not a joke) #20791

colebowl avatar
colebowl commented on May 28, 2018

I'm opening this issue because:

  • [x] npm is crashing.
  • [x] npm is producing an incorrect install.
  • [x] npm is doing something I don't understand.
  • [x] npm is producing incorrect or undesirable behavior.

all of the above.

What's going wrong?

This afternoon all servers in our AWS EU-Frankfurt environment started throwing the error regardless of what package we are trying to install

npm ERR! code E418 npm ERR! 418 I'm a teapot: commander@~2.3.0

It then locks up and does not exit the process.

How can the CLI team reproduce the problem?

npm install

There is nothing being written to the npm-debug.log as the process does not do anything

supporting information:

  • npm -v prints: 5.6.0

  • node -v prints: 8.9.0

  • npm config get registry prints:

  • Windows, OS X/macOS, or Linux?: Amazon Linux AMI release 2017.09

  • Network issues:

    • Geographic location where npm was run: AWS - EU
    • [x ] I use a proxy to connect to the npm registry.
    • [x ] I use a proxy to connect to the web.
    • [x ] I use a proxy when downloading Git repos.
    • [ ] I access the npm registry via a VPN
    • [ ] I don't use a proxy, but have limited or unreliable internet access.
  • Container: No container.

The moral of the story is to think carefully about referencing Easter eggs like this in your projects, even in supposedly unreachable code!

felipperegazio profile image
Felippe Regazio

damn... what a mess S: you are totally right about think carefully. you read the comments on this issue and start to get exponentially tense.

denmch profile image
Den McHenry • Edited

One of the speakers at CascadiaJS, Domink Kundel, mentioned this the other day in reference to hardware hacking where, in one example, he used JavaScript to control a coffee maker. He also interfaced with a cheap Star Wars Porg toy to scream at him whenever a Webpack build fails. Good times.

felipperegazio profile image
Felippe Regazio • Edited

Thats so cool! No, really, thats really cool. I would really like to have a coffee maker controlled by JS on my office (and the cheap start wars porg too).

lautarolobo profile image
Lautaro Lobo

Ja, so cool!

markoshiva profile image
Marko Shiva

Don't you read the RFC's? :) I do that regularly :)

felipperegazio profile image
Felippe Regazio • Edited

i should, i know S: