-
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 featurebreaking changeWill break existing deployments when updated without changesWill break existing deployments when updated without changesenhancementRequest 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
Replace generic exceptions with SDK-native error classes that include useful metadata like fault attribution, retryability, and HTTP details.
Problem
The SDK currently raises generic exceptions from various layers (httpx, anyio, task groups) with no context about:
- Whether the error is retryable
- Who is at fault (client, server, network, protocol violation)
- HTTP status codes and response bodies (often discarded)
This makes it hard for users to build robust error handling.
Goal
A hierarchy of typed errors like:
McpError(base) withfault,is_retryable,http_status_code,response_bodyMcpTransportErrorfor connection/network issuesMcpProtocolErrorfor invalid JSON-RPC responsesMcpAuthErrorfor 401/403 responses
Metadata
Metadata
Assignees
Labels
P2Moderate issues affecting some users, edge cases, potentially valuable featureModerate issues affecting some users, edge cases, potentially valuable featurebreaking changeWill break existing deployments when updated without changesWill break existing deployments when updated without changesenhancementRequest 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