Live data from Hacker News

418 I'm a teapot

developer.mozilla.org

71–80 of 195 posts

Re: 418 I'm a teapot

#71
post #59

Many years ago, some person misconfigured their squid proxy and was hitting https://jsonip.com to the point my server at the time was turning green in the gills. I started responding with 418 "You are a tea kettle" or something like that to those specific requests. The originating dev actually paid attention to their error messages and quickly resolved their config issue. Fast forward to March this year. Some fucking…

Sorry but I laughed aloud at all the swearing! But yes, I empathise complelely with your situation. People abusing someone else's free service really gets my goat. I hope this situation is resolved soon.

I do agree with one of the other comments - returning something about Taiwan or Tiannenmen square may do the trick

Re: 418 I'm a teapot

#72
post #60
post #59

Many years ago, some person misconfigured their squid proxy and was hitting https://jsonip.com to the point my server at the time was turning green in the gills. I started responding with 418 "You are a tea kettle" or something like that to those specific requests. The originating dev actually paid attention to their error messages and quickly resolved their config issue. Fast forward to March this year. Some fucking…

>as though there isn't a single human person behind it absorbing the costs and making sure it runs. Obligatory https://xkcd.com/2347/

You are a legend. Many hugs.

Re: 418 I'm a teapot

#74
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.

Why not respond with an error message saying that there’s a missing CSRF token?

abort(418) is just quick and easy and gets the job done… even if I wasn’t the one reviewing the code it would throw up enough confusion to get attention.

It also works perfectly in case it accidentally gets pushed to production.

Re: 418 I'm a teapot

#75
post #70
post #64

Earlier quoted context omitted.

Your website on https://getjsonip.com/ says: > Supports unlimited requests and is free. Maybe update that text? There is no guidance on acceptable thresholds, rate limits, etc.

Yeah I know. That is a legit critique. What's been happening is your essential black swan event. I've been running the service for 12 years and have never had this problem. There are hundreds of websites and independent users that have never abused the api like this until March. I have always been able to absorb the traffic impact. This is different. Someone wasn't thinking and randomly added the domain to a lazy pie…

Unethical tip: start returning the content of this article [0] to these devices. The Chinese government will "fix" the devs for you or simply block all traffic to your site.

[0] https://en.wikipedia.org/wiki/1989_Tiananmen_Square_protests...

Re: 418 I'm a teapot

#76

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…

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

Nope, it’s still unfunny, it should have been deleted then and there. In fact, it has.

Re: 418 I'm a teapot

#77
post #59

Many years ago, some person misconfigured their squid proxy and was hitting https://jsonip.com to the point my server at the time was turning green in the gills. I started responding with 418 "You are a tea kettle" or something like that to those specific requests. The originating dev actually paid attention to their error messages and quickly resolved their config issue. Fast forward to March this year. Some fucking…

No, sorry this is 100% on you. You should have implemented throttling, and daily query limits. Once you put something on the internet for free, you can't complain then if people are using it.

Re: 418 I'm a teapot

#78

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…

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

I promise that knowing it’s supposed to be a joke is _not_ going to make you less frustrated if you ever end up having to debug a non-descriptive 418 error. To make it worse the description and the error code aren’t even consistent. 4xx is a client error, but your web server being a teapot is definitely a server side problem.

Re: 418 I'm a teapot

#79
post #59

Many years ago, some person misconfigured their squid proxy and was hitting https://jsonip.com to the point my server at the time was turning green in the gills. I started responding with 418 "You are a tea kettle" or something like that to those specific requests. The originating dev actually paid attention to their error messages and quickly resolved their config issue. Fast forward to March this year. Some fucking…

Unfortunately, this seems to be the pattern that people offering the same service as you experience.

Take a look at https://major.io/2021/06/06/a-new-future-for-icanhazip/, if you haven't seen it already.

Re: 418 I'm a teapot

#80
post #59

Many years ago, some person misconfigured their squid proxy and was hitting https://jsonip.com to the point my server at the time was turning green in the gills. I started responding with 418 "You are a tea kettle" or something like that to those specific requests. The originating dev actually paid attention to their error messages and quickly resolved their config issue. Fast forward to March this year. Some fucking…

icanhazip.com had similar issues. Cloudflare took over the project https://major.io/2021/06/06/a-new-future-for-icanhazip/

Fyi, dns can be used to obtain public ip from large companies, without the overhead of tcp and http

dig +short txt ch whoami.cloudflare @1.0.0.1

dig +short txt o-o.myaddr.l.google.com @ns1.google.com

dig +short myip.opendns.com @resolver1.opendns.com

Post reply on HN