-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Normalize handling 403 for rate limits on 'dataset.create()'. #2089
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
Normalize handling 403 for rate limits on 'dataset.create()'. #2089
Conversation
|
|
||
| # We need to wait to stay within the rate limits. | ||
| # The alternative outcome is a 403 Forbidden response from upstream. | ||
| # See: https://cloud.google.com/bigquery/quota-policy |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
A 429 ("Too many requests") would be way more appropriate than a 403
("Forbidden"), but there is nothing we can do about it here.
Addresses:
#2089 (comment)
We could deal with backend changes if / when tests fail. You can make it a bit less brittle via: 'rate limit' in error.message.lower() |
|
In 10e4f51, I figured out that we capture the JSON error structure, which means we can use the documented |
Exclude Forbidden exceptions which do not have 'rateLimitExceed' as the reason for one of their errors. Addresses: #2089 (comment).
|
Nice find! LGTM |
Fixes #2075.