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
This is the "server error" portion of the JSON-RPC error space, "reserved for implementation-defined server-errors."
Since MCP clients and servers are both JSON-RPC servers, it feels appropriate for the SDK to stay within this error code range—leaving the remaining error codes available for custom application usage.
The text was updated successfully, but these errors were encountered:
The SDK's custom error codes were previously using arbitrary negative numbers
(-1, -2) which could conflict with application-specific error codes. This change:
- Updates ConnectionClosed from -1 to -32000
- Updates RequestTimeout from -2 to -32001
- Keeps standard JSON-RPC error codes unchanged
- Adds documentation explaining the server error range usage
This modification ensures compliance with the JSON-RPC 2.0 specification, which
reserves -32000 to -32099 for implementation-defined server errors. This change
allows applications to freely use other error code ranges without potential
conflicts with SDK-generated errors.
Issue: modelcontextprotocol#85
This is the "server error" portion of the JSON-RPC error space, "reserved for implementation-defined server-errors."
Since MCP clients and servers are both JSON-RPC servers, it feels appropriate for the SDK to stay within this error code range—leaving the remaining error codes available for custom application usage.
The text was updated successfully, but these errors were encountered: