Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add 'requests.exceptions.ChunkedEncodingError' to retryable exceptions #237

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions google/api_core/retry.py
Expand Up @@ -104,6 +104,7 @@ def if_exception_type_predicate(exception):
exceptions.TooManyRequests,
exceptions.ServiceUnavailable,
requests.exceptions.ConnectionError,
requests.exceptions.ChunkedEncodingError,
auth_exceptions.TransportError,
)
"""A predicate that checks if an exception is a transient API error.
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_retry.py
Expand Up @@ -45,6 +45,7 @@ def test_if_transient_error():
assert retry.if_transient_error(exceptions.TooManyRequests(""))
assert retry.if_transient_error(exceptions.ServiceUnavailable(""))
assert retry.if_transient_error(requests.exceptions.ConnectionError(""))
assert retry.if_transient_error(requests.exceptions.ChunkedEncodingError(""))
assert retry.if_transient_error(auth_exceptions.TransportError(""))
assert not retry.if_transient_error(exceptions.InvalidArgument(""))

Expand Down