From 0cc7650e653eba158145e2deb1d1f82b589f6441 Mon Sep 17 00:00:00 2001 From: Tanmay Sharma Date: Mon, 23 Mar 2026 16:59:52 +0530 Subject: [PATCH] fix(aiohttp): catch asyncio.CancelledError in map_aiohttp_exceptions --- litellm/llms/custom_httpx/aiohttp_transport.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/llms/custom_httpx/aiohttp_transport.py b/litellm/llms/custom_httpx/aiohttp_transport.py index 132191c946c..eb5dc3f9ad9 100644 --- a/litellm/llms/custom_httpx/aiohttp_transport.py +++ b/litellm/llms/custom_httpx/aiohttp_transport.py @@ -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():