-
Notifications
You must be signed in to change notification settings - Fork 319
Closed
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.Issues related to the googleapis/python-bigquery API.
Description
In many cases, users want to be able to retry rateLimitExceeded
errors. Many retry libraries and codebases support this by automatically retrying HTTP exceptions with a 429 Too Many Requests
HTTP error, and any 5XX
error codes. For example, BigQuery itself. However BigQuery will raise a 403 Forbidden
for rate limit problems - see:
"rateLimitExceeded": http.client.FORBIDDEN, |
A 403 Forbidden
implies that the API user does not have the permissions or authentication credentials to do the thing. That seems inappropriate for a rateLimitError
, right?
This mis-coding has two consequences for retry logic:
- In codebases where you'd expect to get retries for free, you don't, because libraries won't retry a
403 Forbidden
, and rightly so - why would you retry an access error. - Users who do want to implement retries for BQ
rateLimitExceeded
errors now have to retry on403 Forbidden
, possibly causing them to retry genuine permissions/auth errors that will fail no matter how many attempts.
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/python-bigquery API.Issues related to the googleapis/python-bigquery API.