mco: update JSON-RPC error codes to align with updated MCP specification (#1016)
This PR updates the error codes to align with the updated specifications in https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2907 ErrServerClosing and ErrClientClosing are reverted to their 1.6.0 version codes, as they do not overlap anymore with the newly introduced error codes.
This commit is contained in:
parent
17029489ff
commit
3486f6bcaf
1 changed files with 18 additions and 16 deletions
|
|
@ -355,15 +355,15 @@ func clientSessionMethod[P Params, R Result](f func(*ClientSession, context.Cont
|
|||
|
||||
// MCP-specific error codes.
|
||||
const (
|
||||
// CodeMissingRequiredClientCapabilities is the JSON-RPC error code defined by
|
||||
// SEP-2575 for MissingRequiredClientCapabilitiesError.
|
||||
CodeMissingRequiredClientCapabilities = -32003
|
||||
// CodeUnsupportedProtocolVersion is the JSON-RPC error code defined by
|
||||
// SEP-2575 for UnsupportedProtocolVersionError.
|
||||
CodeUnsupportedProtocolVersion = -32004
|
||||
// CodeHeaderMismatch indicates that HTTP headers do not match the corresponding values
|
||||
// in the request body, or that required headers are missing or malformed.
|
||||
CodeHeaderMismatch = -32001
|
||||
CodeHeaderMismatch = -32020
|
||||
// CodeMissingRequiredClientCapabilities is the JSON-RPC error code defined by
|
||||
// SEP-2575 for MissingRequiredClientCapabilitiesError.
|
||||
CodeMissingRequiredClientCapabilities = -32021
|
||||
// CodeUnsupportedProtocolVersion is the JSON-RPC error code defined by
|
||||
// SEP-2575 for UnsupportedProtocolVersionError.
|
||||
CodeUnsupportedProtocolVersion = -32022
|
||||
// CodeURLElicitationRequired indicates that the server requires URL elicitation
|
||||
// before processing the request. The client should execute the elicitation handler
|
||||
// with the elicitations provided in the error data.
|
||||
|
|
|
|||
Loading…
Reference in a new issue