Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It would make sense to include the rate limit info in the ErrorResponse #14

Open
Ruud-cb opened this issue Oct 4, 2023 · 1 comment

Comments

@Ruud-cb
Copy link

Ruud-cb commented Oct 4, 2023

...Because when a exception occurs with a 429 ToManyRequests, the ErrorResponse exception does not contain info about the reset-datetime or how many seconds I need to wait.
Such info now needs to be cached with OK requests.

Please call the ProcessRateLimits and include it in the constructor of ErrorResponse at the following line:

throw new ErrorResponse(response.StatusCode, responseBody);

@Ruud-cb
Copy link
Author

Ruud-cb commented Oct 4, 2023

Seems like there is also a difference between to many requests in a short period of time, and actually reaching the monthly limit.
In both cases, a reset-time-date would be the best option. That can either be a in a few days time (when the monthly limit is reached) or in a few seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant