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

API client hangs forever when rate limit exceeded #4

Open
mhoban opened this issue Jan 10, 2024 · 2 comments
Open

API client hangs forever when rate limit exceeded #4

mhoban opened this issue Jan 10, 2024 · 2 comments

Comments

@mhoban
Copy link

mhoban commented Jan 10, 2024

When the daily request limit is exceeded, the client should throw an exception. Instead, the request just hangs forever. I can get around this by wrapping the call in some clever timeout code, but the API itself should fail immediately with an informative exception.

I can reproduce this by just running the example code in a loop 50 times, sleeping for a second between each request so as not to exceed the rate limit.

If I try the request through curl, I get a JSON response saying "rate limit exceeded", so it's clear the result is coming through somewhere, it's just not being interpreted correctly.

@gneissone
Copy link
Collaborator

@mhoban The API itself, as you noted, will send a prompt 429 response with the "rate limit exceeded" message. This client is generated using the OpenAPI Generator.

I see support for rate limiting was added to the C# client a few years ago, but I can't find anything for Python. We may need to submit an improvement request with that project.

@mhoban
Copy link
Author

mhoban commented Jan 12, 2024

I suspected it was something like that. In the meantime, it looks like the client will just just keep re-trying until the request limit resets which in this particular case actually works out just fine.

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

No branches or pull requests

2 participants