socket.gaierror (dns error) is not converted to ClientConnectorError #2423
Closed
Description
Long story short
socket.gaierror should be converted to ClientConnectorError
Expected behaviour
raises ClientConnectorError
Actual behaviour
raises socket.gaierror (for threaded resolver) or OSError (for aiodns resolver)
Steps to reproduce
import aiohttp
import asyncio
async def main():
async with aiohttp.ClientSession() as session:
async with session.get('http://notexist.domain') as response:
return await response.text()
loop = asyncio.get_event_loop()
loop.run_until_complete(main())Your environment
MacOS 10.12.6
Python 3.6.2 from pyenv