mojang-api icon indicating copy to clipboard operation
mojang-api copied to clipboard

Random 404 errors for people that exist

Open ImPlotzes opened this issue 3 years ago • 6 comments

Recently I've noticed that I will sometimes get a 404 error when searching a player that does exist. The weird thing is that when I search the same player a few minutes later it will work as normal. I can't seem to find a pattern so I'm not sure what it could be.

image

ImPlotzes avatar Apr 02 '21 12:04 ImPlotzes

This may be due to this problem: https://github.com/Electroid/mojang-api/issues/28

If this happens again, try making a request to version 1 of the API and see the error code.

egorprnn avatar Apr 04 '21 02:04 egorprnn

~~How do I change the version?~~ Sorry, I'm just not the smartest!!

ImPlotzes avatar Apr 08 '21 22:04 ImPlotzes

This may be due to this problem: #28

If this happens again, try making a request to version 1 of the API and see the error code.

I've been using the v1 API, and I haven't been getting weird 404 errors, but I sometimes get 429 - Too many requests. This is kinda weird to me since I thought this service was caching results and so you wouldn't need to cache the results on your own. It is especially weird to me since I can get a 429 result when my last call was over 30 mins ago...

ImPlotzes avatar May 01 '21 18:05 ImPlotzes

I have also noticed recently that the restrictions have become a bit strict, with a small number of requests, you can run into rate limit.

egorprnn avatar May 02 '21 04:05 egorprnn

I've also noticed that other sites that call the Mojang API are having issues too.

harvanchik avatar May 02 '21 05:05 harvanchik

Mojang likes changing things without notice, so I will revisit the caching TTL and fix the miscategorization of the 429 errors. Sorry some of y'all have downgraded to v1 to avoid this; not ideal. Will prioritize this.

Electroid avatar May 07 '21 21:05 Electroid

Fixed

Electroid avatar Nov 27 '22 15:11 Electroid