Electroid / mojang-api

Bundle multiple Minecraft APIs into a single GET request.
https://api.ashcon.app/mojang/v2/user/Notch
MIT License
242 stars 17 forks source link

Random 404 errors for people that exist #40

Closed ImPlotzes closed 2 years ago

ImPlotzes commented 3 years ago

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

MrZillaGold commented 3 years ago

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.

ImPlotzes commented 3 years ago

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

ImPlotzes commented 3 years ago

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

MrZillaGold commented 3 years ago

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.

harvanchik commented 3 years ago

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

Electroid commented 3 years ago

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 commented 2 years ago

Fixed