fix: add 'requests.exceptions.ChunkedEncodingError' to retryable exceptions (#237)
Closes #235.
diff --git a/google/api_core/retry.py b/google/api_core/retry.py
index f0f23bc..8496793 100644
--- a/google/api_core/retry.py
+++ b/google/api_core/retry.py
@@ -104,6 +104,7 @@
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.
diff --git a/tests/unit/test_retry.py b/tests/unit/test_retry.py
index f24c82b..199ca55 100644
--- a/tests/unit/test_retry.py
+++ b/tests/unit/test_retry.py
@@ -45,6 +45,7 @@
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(""))