Content-Length: 311522 | pFad | https://www.github.com/googleapis/python-bigquery/commit/34ecc3f1ca0ff073330c0c605673d89b43af7ed9

1C2 feat: retry google.auth TransportError by default (#624) · googleapis/python-bigquery@34ecc3f · GitHub
Skip to content

Commit 34ecc3f

Browse files
authored
feat: retry google.auth TransportError by default (#624)
1 parent 6ee5824 commit 34ecc3f

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
from google.api_core import exceptions
1616
from google.api_core import retry
17+
from google.auth import exceptions as auth_exceptions
1718
import requests.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+
def test_w_auth_transporterror(self):
55+
from google.auth.exceptions import TransportError
56+
57+
exc = TransportError("testing")
58+
self.assertTrue(self._call_fut(exc))
59+
5460
def test_w_unstructured_too_many_requests(self):
5561
from google.api_core.exceptions import TooManyRequests
5662

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://www.github.com/googleapis/python-bigquery/commit/34ecc3f1ca0ff073330c0c605673d89b43af7ed9

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy