Skip to content

Commit e7e0fcf

Browse files
authored
Bug: revises Exception type (#1994)
* revises Exception type * updates error choices
1 parent 8f5a41d commit e7e0fcf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

google/cloud/bigquery/job/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"notImplemented": http.client.NOT_IMPLEMENTED,
5050
"policyViolation": http.client.FORBIDDEN,
5151
"quotaExceeded": http.client.FORBIDDEN,
52-
"rateLimitExceeded": http.client.FORBIDDEN,
52+
"rateLimitExceeded": http.client.TOO_MANY_REQUESTS,
5353
"resourceInUse": http.client.BAD_REQUEST,
5454
"resourcesExceeded": http.client.BAD_REQUEST,
5555
"responseTooLarge": http.client.FORBIDDEN,

tests/unit/test_job_retry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def api_request(method, path, query_params=None, data=None, **kw):
442442

443443
orig_job_id = job.job_id
444444
job_retry = dict(job_retry=None) if job_retry_on_query == "Result" else {}
445-
with pytest.raises(google.api_core.exceptions.Forbidden):
445+
with pytest.raises(google.api_core.exceptions.TooManyRequests):
446446
job.result(**job_retry)
447447

448448
assert job.job_id == orig_job_id

0 commit comments

Comments
 (0)