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

Automatically handle rate limiting #64

Open
bmiller59 opened this issue Oct 26, 2020 · 1 comment
Open

Automatically handle rate limiting #64

bmiller59 opened this issue Oct 26, 2020 · 1 comment

Comments

@bmiller59
Copy link

In our use of this library, we are receiving 429 / Too many requests errors.

This library should handle rate limiting automatically so that these errors are not encountered, perhaps on an opt-in basis using some config parameters.

If that is not possible, then at a minimum it should expose the X-RateLimit-Limit and X-RateLimit-Remaining headers, and provide a function that will take a job and return a delay to wait in order avoid triggering these errors so that we can implement our own queuing.

Thank you.

Referrence: https://cloudconvert.com/api/v2#errors

@KnorpelSenf
Copy link
Contributor

I think it should already be possible to access the error data via error.response.headers, can you confirm this?

@josiasmontag it may still make sense to handle rate limiting automatically, or document how to obtain the retry-after headers instead.

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

No branches or pull requests

3 participants