Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit34ecc3f

Browse files
authored
feat: retry google.auth TransportError by default (#624)
1 parent6ee5824 commit34ecc3f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

‎google/cloud/bigquery/retry.py‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
fromgoogle.api_coreimportexceptions
1616
fromgoogle.api_coreimportretry
17+
fromgoogle.authimportexceptionsasauth_exceptions
1718
importrequests.exceptions
1819

1920

@@ -27,6 +28,7 @@
2728
exceptions.InternalServerError,
2829
exceptions.BadGateway,
2930
requests.exceptions.ConnectionError,
31+
auth_exceptions.TransportError,
3032
)
3133

3234

‎tests/unit/test_retry.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ def test_w_unstructured_requests_connectionerror(self):
5151
exc=requests.exceptions.ConnectionError()
5252
self.assertTrue(self._call_fut(exc))
5353

54+
deftest_w_auth_transporterror(self):
55+
fromgoogle.auth.exceptionsimportTransportError
56+
57+
exc=TransportError("testing")
58+
self.assertTrue(self._call_fut(exc))
59+
5460
deftest_w_unstructured_too_many_requests(self):
5561
fromgoogle.api_core.exceptionsimportTooManyRequests
5662

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp