We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7dfa1ad commit 10e4f51Copy full SHA for 10e4f51
1 file changed
system_tests/bigquery.py
@@ -29,11 +29,17 @@
29
30
DATASET_NAME = 'system_tests' + unique_resource_id()
31
32
+
33
+def _rate_limit_exceeded(forbidden):
34
+ """Predicate: pass only exceptions with 'rateLimitExceeded' as reason."""
35
+ return any(error['reason'] == 'rateLimitExceeded'
36
+ for error in forbidden._errors)
37
38
# We need to wait to stay within the rate limits.
39
# The alternative outcome is a 403 Forbidden response from upstream, which
40
# they return instead of the more appropriate 429.
41
# See: https://cloud.google.com/bigquery/quota-policy
-retry_403 = RetryErrors(Forbidden)
42
+retry_403 = RetryErrors(Forbidden, error_predicate=_rate_limit_exceeded)
43
44
45
class Config(object):
0 commit comments