HypixelDev / PublicAPI

Official Java implementation of the Hypixel Public API.
https://api.hypixel.net
MIT License
535 stars 151 forks source link

Incorrect response header for the first response in a new rate limit period #646

Closed johndoknjas closed 2 weeks ago

johndoknjas commented 1 month ago

I only noticed this today so it might be caused by a recent update to the api. An example:

I receive a response header with the info: "ratelimit-limit": "300", "ratelimit-remaining": "1", "ratelimit-reset": "225". Here in my code I sleep for 226 seconds. Afterwards I make another call, and receive this response header: "ratelimit-limit": "300", "ratelimit-remaining": "0", "ratelimit-reset": "299". Here the ratelimit-reset val is greater than before, so we're correctly in a new 5 minute rate limit period. However, the ratelimit-remaining val is 0, when it should be around 299.

ConnorLinfoot commented 2 weeks ago

I'm unable to reproduce this issue, I assume it has since been resolved