-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featureenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes
Description
Summary
Make exception tracebacks clearer and easier to understand by reducing asyncio/anyio wrapper noise.
Problem
- Exceptions are often wrapped in multiple layers of asyncio/anyio task group machinery
- Tracebacks are hard to read and don't clearly point to the root cause
- The
raise_exceptionflag is not consistently respected - Errors from deep inside task groups obscure the actual failure point
Goal
- Cleaner tracebacks that point to user code, not SDK internals
- Raise exceptions from the main context where possible
- Reduce nesting of exception wrappers
Related
- RuntimeError but the actual root cause is not logged correctly #743 - RuntimeError but the actual root cause is not logged correctly
- MCP Server: Inconsistent Exception Handling in @app.call_tool and Client Undetected Server Termination via Stdio #396 - MCP Server: Inconsistent Exception Handling in @app.call_tool
- ClientSession Error Handling #1401 - ClientSession Error Handling
- Introduce typed error classes with metadata #1742 - Introduce typed error classes with metadata
Metadata
Metadata
Assignees
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featureenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedv2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixesIdeas, requests and plans for v2 of the SDK which will incorporate major changes and fixes