Skip to content
Myr

Consolidate error handling

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Ian Cordasco · committed by Ian Cordasco · parent ce7957c · Browse files · 1 file+2 added−5 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−5 removed

  • other:+2 added−5 removed

1 file+2 added−5 removed

modified:requests/adapters.py+2 added-5 removed
399 unmodified lines
400 else:401 # All is well, return the connection to the pool.402 conn._put_conn(low_conn)403404 except socket.error as sockerr:405 raise ConnectionError(sockerr, request=request)404 except (ProtocolError, socket.error) as err:405 raise ConnectionError(err, request=request)406407 except ProtocolError as e:408 raise ConnectionError(e, request=request)409407 except MaxRetryError as e:408 if isinstance(e.reason, ConnectTimeoutError):409 raise ConnectTimeout(e, request=request)410
14 unmodified lines