Live data from Hacker News

418 I'm a teapot

developer.mozilla.org

91–100 of 195 posts

Re: 418 I'm a teapot

#91
post #69
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.

That appears to be a different URL

One is a marketing and docs site, the other is the "api".

Re: 418 I'm a teapot

#92
post #89

Earlier quoted context omitted.

> you can't complain then if people are using it. Yes he can complain, and bombarding a free service for unlimited requests isn't okay. For starters because the people doing that, will usually be among the first to cry when the free service stops being free, blocks their requests or suddenly requires an API key.

> bombarding a free service for unlimited requests isn't okay Hummmm.... OP's website on https://getjsonip.com/ says: > Supports unlimited requests and is free. Seems like we have a bit of a contradiction here.

I see no contradiction.

There is a difference between gracefully and responsibly using something that is offered for free, and just bombarding it with requests like no tomorrow.

People can of course do the latter. But then they don't get to complain when at some point, the available offerings present walls of legalese instead of a few simple and clear statements, and the user experience goes from seamless and easy to "Click here to register an API Key"

Re: 418 I'm a teapot

#93
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…

Wikipedia had a similar situation with a single flower image being requested so many times. I can't find the story and don't remember it well, but I think it was a big indian company using this image to check if internet was available. IMHO, one of the problems is that many dev. don't realize both the size of their company and the impact of so many requests. I hop you'll find a solution, and thank you for your servic…

Oh yes! I remember that!

[1]: Wikimedia Phabricator link: https://phabricator.wikimedia.org/T273741

[2]: HackerNews thread: https://news.ycombinator.com/item?id=26072025

Re: 418 I'm a teapot

#94
post #70

Earlier quoted context omitted.

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

Or geolocate Chinese IPs to Taiwan.

Re: 418 I'm a teapot

#95
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…

Explicitly telling some junior software developer in China that he can call an API for free an unlimited number of times, then afterwards calling it abuse and him and a-hole dev is definitively a bit of an a-hole thing to do in my view.

Re: 418 I'm a teapot

#96
post #74

Earlier quoted context omitted.

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.

It doesn’t get the job done though… for anything non-trivial multiple errors can occur and if you just abort(418) then you don’t know which one it is. If you generate a real error message you can include some actually useful information. “This is some kind of error I triggered” is not anywhere near as useful as “The error is…”.

Re: 418 I'm a teapot

#97
post #70

Earlier quoted context omitted.

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

What a big brain move, that might actually work. Unless of course the devices are being sold abroad.

Re: 418 I'm a teapot

#98

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…

No, it's a great canary in the coal mine. Anyone who doesn't implement proper handling of 418 gets their general error handling facilities tested (4xx).

What is the correct way to handle a 418? As if it were a 500? A 400? A 403? A 404? A 429?…

Re: 418 I'm a teapot

#100
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…

> However Cloudflare doesn't properly ... Despite numerous support requests, that's still shmaybe an enterprise level feature.

This matches my experience. I'd use the CF free plan assuming no guarantees for a low risk site like my personal site, and I'd use the expensive enterprise plan where I'm paying individually for features and quota, but I'd never use the middle-ground "sure it's unlimited!" plan – it's far too vague about what it _actually_ provides.

Post reply on HN