Live data from Hacker News

418 I'm a teapot

developer.mozilla.org

41–50 of 195 posts

Re: 418 I'm a teapot

#44
post #31
post #17

I honestly use this a lot when I'm testing, because it's basically the only response that can show up where I know god damned well that it's only happening because I programmed it to happen under certain conditions. edit: a common one for me is that if any test passes a post request without a csrf token... sorry, I'm a teapot, because I forgot to add a csrf token to that form.

It’s still in my production code, usually in places where i don’t expect code to ever lead to. It’s just my general “something particularly odd has happened” response.

I do this too for the same reason, but also for the next person that looks at my code to give the joy of laughter.

Re: 418 I'm a teapot

#46
post #7

Earlier quoted context omitted.

It was added as a joke, and kept because (according to https://save418.com ) > “It's a reminder that the underlying processes of computers are still made by humans”

Stupid reason imo. Adding childish humor to a protocol seems like harmless fun until you remember how much of a mess network protocols, and their specs, and their implementation is. Maybe you think a 418 error page is funny, but I think you’ll appreciate it a lot less when your application gets a rather confounding error because some service provider wanted to remind you that the underlying processes of computers are…

...

Nope, it's still funny, we're keeping it.

Re: 418 I'm a teapot

#47
Every time this pops up, I'm reminded of the day that the NPM registry started returning 418 responses for users accessing it via corporate HTTP proxies.

I remember being at a training course that day and my manager asking me what we could do to fix it because our CI was failing to pull dependencies from NPM.

Trying to explain that NPM was returning a status code intended as an April Fools joke and which was never meant to see the light of production was quite difficult

Perhaps I can fix a lot of things but debugging a response code that isn't meant to exist is not one of them.

https://github.com/npm/npm/issues/20791

Re: 418 I'm a teapot

#48
post #29

Earlier quoted context omitted.

Stupid reason imo. Adding childish humor to a protocol seems like harmless fun until you remember how much of a mess network protocols, and their specs, and their implementation is. Maybe you think a 418 error page is funny, but I think you’ll appreciate it a lot less when your application gets a rather confounding error because some service provider wanted to remind you that the underlying processes of computers are…

/me slaps AmericanChopper around a bit with a large trout https://en.wiktionary.org/wiki/trout_slap

That’s trout abuse.

Re: 418 I'm a teapot

#49
post #31
post #17

I honestly use this a lot when I'm testing, because it's basically the only response that can show up where I know god damned well that it's only happening because I programmed it to happen under certain conditions. edit: a common one for me is that if any test passes a post request without a csrf token... sorry, I'm a teapot, because I forgot to add a csrf token to that form.

It’s still in my production code, usually in places where i don’t expect code to ever lead to. It’s just my general “something particularly odd has happened” response.

I've never worked on a webserver but doesn't 500 seem better suited for that condition?
Post reply on HN