You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`SdkErrorCode.NotConnected`| Transport is not connected |
406
+
|`SdkErrorCode.AlreadyConnected`| Transport is already connected |
407
+
|`SdkErrorCode.NotInitialized`| Protocol is not initialized |
408
+
|`SdkErrorCode.CapabilityNotSupported`| Required capability is not supported |
409
+
|`SdkErrorCode.RequestTimeout`| Request timed out waiting for response |
410
+
|`SdkErrorCode.ConnectionClosed`| Connection was closed |
411
+
|`SdkErrorCode.SendFailed`| Failed to send message |
412
+
|`SdkErrorCode.ClientHttpNotImplemented`| HTTP POST request failed |
413
+
|`SdkErrorCode.ClientHttpAuthentication`| Server returned 401 after successful auth |
414
+
|`SdkErrorCode.ClientHttpForbidden`| Server returned 403 after trying upscoping |
415
+
|`SdkErrorCode.ClientHttpUnexpectedContent`| Unexpected content type in HTTP response |
416
+
|`SdkErrorCode.ClientHttpFailedToOpenStream`| Failed to open SSE stream |
417
+
|`SdkErrorCode.ClientHttpFailedToTerminateSession`| Failed to terminate session |
418
+
419
+
#### `StreamableHTTPError` removed
420
+
421
+
The `StreamableHTTPError` class has been removed. HTTP transport errors are now thrown as `SdkError` with specific `SdkErrorCode` values that provide more granular error information:
Previously, `ErrorCode.RequestTimeout` (-32001) and `ErrorCode.ConnectionClosed` (-32000) were used for local timeout/connection errors. However, these errors never cross the wire as JSON-RPC responses - they are rejected locally. Using protocol error codes for local errors was
469
+
semantically inconsistent.
470
+
471
+
The new design:
472
+
473
+
-`ProtocolError` with `ProtocolErrorCode`: For errors that are serialized and sent as JSON-RPC error responses
474
+
-`SdkError` with `SdkErrorCode`: For local errors that are thrown/rejected locally and never leave the SDK
475
+
476
+
### OAuth error refactoring
477
+
478
+
The OAuth error classes have been consolidated into a single `OAuthError` class with an `OAuthErrorCode` enum.
479
+
480
+
#### Removed classes
481
+
482
+
The following individual error classes have been removed in favor of `OAuthError` with the appropriate code:
0 commit comments