diff --git a/sentry_sdk/integrations/asyncio.py b/sentry_sdk/integrations/asyncio.py index ae580ca038..66742fe6e4 100644 --- a/sentry_sdk/integrations/asyncio.py +++ b/sentry_sdk/integrations/asyncio.py @@ -51,6 +51,8 @@ async def _task_with_sentry_span_creation(): ): try: result = await coro + except StopAsyncIteration as e: + raise e from None except Exception: reraise(*_capture_exception())