Closed cozos closed 2 weeks ago
Transferring this issue to the Bigquery team since the error is raised from the backend API and not the client.
This should be fixed by this PR. It seems like this might be a duplicate of Issue #1985
https://github.com/googleapis/python-bigquery/pull/1994
Closing.
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 a429 Too Many Requests
HTTP error, and any5XX
error codes. For example, BigQuery itself. However BigQuery will raise a403 Forbidden
for rate limit problems - see: https://github.com/googleapis/python-bigquery/blob/f55864ec3d6381f2b31598428a64822fdc73cb56/google/cloud/bigquery/job/base.py#L49A
403 Forbidden
implies that the API user does not have the permissions or authentication credentials to do the thing. That seems inappropriate for arateLimitError
, right?This mis-coding has two consequences for retry logic:
403 Forbidden
, and rightly so - why would you retry an access error.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.