|
14 | 14 | EndpointConnectionError, ProxyConnectionError, ConnectTimeoutError, \
|
15 | 15 | ConnectionClosedError, HTTPClientError, ReadTimeoutError, logger, get_cert_path
|
16 | 16 |
|
| 17 | +from aiobotocore import DEPRECATED_1_4_0_APIS |
17 | 18 | from aiobotocore._endpoint_helpers import _text, _IOBaseWrapper, \
|
18 | 19 | ClientResponseProxy
|
19 | 20 |
|
@@ -162,22 +163,43 @@ async def send(self, request):
|
162 | 163 |
|
163 | 164 | return resp
|
164 | 165 | except ClientSSLError as e:
|
| 166 | + if DEPRECATED_1_4_0_APIS: |
| 167 | + raise |
| 168 | + |
165 | 169 | raise SSLError(endpoint_url=request.url, error=e)
|
166 | 170 | except (ClientConnectorError, socket.gaierror) as e:
|
| 171 | + if DEPRECATED_1_4_0_APIS: |
| 172 | + raise |
| 173 | + |
167 | 174 | raise EndpointConnectionError(endpoint_url=request.url, error=e)
|
168 | 175 | except (ClientProxyConnectionError, ClientHttpProxyError) as e:
|
| 176 | + if DEPRECATED_1_4_0_APIS: |
| 177 | + raise |
| 178 | + |
169 | 179 | raise ProxyConnectionError(proxy_url=proxy_url, error=e)
|
170 | 180 | except ServerTimeoutError as e:
|
| 181 | + if DEPRECATED_1_4_0_APIS: |
| 182 | + raise |
| 183 | + |
171 | 184 | raise ConnectTimeoutError(endpoint_url=request.url, error=e)
|
172 | 185 | except asyncio.TimeoutError as e:
|
| 186 | + if DEPRECATED_1_4_0_APIS: |
| 187 | + raise |
| 188 | + |
173 | 189 | raise ReadTimeoutError(endpoint_url=request.url, error=e)
|
174 | 190 | except ServerDisconnectedError as e:
|
| 191 | + if DEPRECATED_1_4_0_APIS: |
| 192 | + raise |
| 193 | + |
175 | 194 | raise ConnectionClosedError(
|
176 | 195 | error=e,
|
177 | 196 | request=request,
|
178 | 197 | endpoint_url=request.url
|
179 | 198 | )
|
180 | 199 | except Exception as e:
|
| 200 | + if DEPRECATED_1_4_0_APIS: |
| 201 | + raise |
| 202 | + |
181 | 203 | message = 'Exception received when sending urllib3 HTTP request'
|
182 | 204 | logger.debug(message, exc_info=True)
|
183 | 205 | raise HTTPClientError(error=e)
|
0 commit comments