File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 13
13
# limitations under the License.
14
14
15
15
import requests
16
+ import requests .exceptions as requests_exceptions
16
17
17
18
from google .api_core import exceptions as api_exceptions
18
19
from google .api_core import retry
33
34
api_exceptions .ServiceUnavailable , # 503
34
35
api_exceptions .GatewayTimeout , # 504
35
36
requests .ConnectionError ,
37
+ requests_exceptions .ChunkedEncodingError ,
36
38
)
37
39
38
40
Original file line number Diff line number Diff line change @@ -69,6 +69,12 @@ def test_w_requests_connection_error(self):
69
69
exc = requests .ConnectionError ()
70
70
self .assertTrue (self ._call_fut (exc ))
71
71
72
+ def test_w_requests_chunked_encoding_error (self ):
73
+ import requests .exceptions
74
+
75
+ exc = requests .exceptions .ChunkedEncodingError ()
76
+ self .assertTrue (self ._call_fut (exc ))
77
+
72
78
def test_miss_w_stdlib_error (self ):
73
79
exc = ValueError ("testing" )
74
80
self .assertFalse (self ._call_fut (exc ))
You can’t perform that action at this time.
0 commit comments