DEV Community

418 HTTP Status Code: Im a teapot!

Felippe Regazio on November 09, 2019

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...
Collapse
 
nickytonline profile image
Nick Taylor •

This API for HTTP error codes always cracks me up.

Check out their HTTP 418 error code. 😸

Collapse
 
felipperegazio profile image
Felippe Regazio •

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

Collapse
 
nickytonline profile image
Nick Taylor •

Not related to your post, but since you liked the http.cat 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.

Sponsor:

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.

Index

Thread Thread
 
felipperegazio profile image
Felippe Regazio •

really nice. thank you!

Collapse
 
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: registry.npmjs.org/

  • 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!

Collapse
 
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.

Collapse
 
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.

Collapse
 
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).

Collapse
 
markoshiva profile image
Marko Shiva •

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

Collapse
 
felipperegazio profile image
Felippe Regazio • • Edited

i should, i know S:

Collapse
 
lautarolobo profile image
Lautaro Lobo •

Ja, so cool!