Skip to content
Next Next commit
Aiohttp read timeout
  • Loading branch information
annatisch committed Jul 25, 2019
commit 2b9b623d2c099373846f812dca3a2b98f8598fe9
5 changes: 3 additions & 2 deletions sdk/core/azure-core/azure/core/pipeline/transport/aiohttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import aiohttp

from azure.core.configuration import ConnectionConfiguration
from azure.core.exceptions import ServiceRequestError
from azure.core.exceptions import ServiceRequestError, ServiceResponseError
from azure.core.pipeline import Pipeline

from requests.exceptions import (
Expand Down Expand Up @@ -181,7 +181,8 @@ async def send(self, request: HttpRequest, **config: Any) -> Optional[AsyncHttpR
await response.load_body()
except aiohttp.client_exceptions.ClientConnectorError as err:
error = ServiceRequestError(err, error=err)

except asyncio.TimeoutError as err:
error = ServiceResponseError(err, error=err)
if error:
raise error
return response
Expand Down