fix(aiohttp): catch asyncio.CancelledError in map_aiohttp_exceptions

This commit is contained in:
Tanmay Sharma 2026-03-23 16:59:52 +05:30
parent c89496f378
commit 0cc7650e65

View file

@ -59,7 +59,7 @@ except ImportError:
def map_aiohttp_exceptions() -> typing.Iterator[None]:
try:
yield
except Exception as exc:
except (Exception, asyncio.CancelledError) as exc:
mapped_exc = None
for from_exc, to_exc in AIOHTTP_EXC_MAP.items():