async def boom(): raise ValueError("x") async def main(): res = await asyncio.gather(boom(), boom(), return_exceptions=True) print([type(r).__name__ for r in res]) asyncio.run(main())