Skip to content

Commit

Permalink
Retry '502 Bad Gateway' errors by default. (#5930)
Browse files Browse the repository at this point in the history
Closes #5918.
  • Loading branch information
tseaver authored Sep 11, 2018
1 parent 4d26f62 commit f3e00ad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions bigquery/google/cloud/bigquery/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
'backendError',
'rateLimitExceeded',
'internalError',
'badGateway',
])


Expand Down
5 changes: 5 additions & 0 deletions bigquery/tests/unit/test_retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,8 @@ def test_w_internalError(self):
exc = mock.Mock(
errors=[{'reason': 'internalError'}], spec=['errors'])
self.assertTrue(self._call_fut(exc))

def test_w_badGateway(self):
exc = mock.Mock(
errors=[{'reason': 'badGateway'}], spec=['errors'])
self.assertTrue(self._call_fut(exc))

0 comments on commit f3e00ad

Please sign in to comment.