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
|
|
@ -955,7 +955,8 @@ func (s *stream) release() {
|
|||
//
|
||||
// Per SEP-2575:
|
||||
// - MethodNotFound (-32601) MUST return HTTP 404.
|
||||
// - InvalidParams (-32602) and UnsupportedProtocolVersion (-32004) MUST
|
||||
// - InvalidParams (-32602), UnsupportedProtocolVersion (-32022) and
|
||||
// CodeMissingRequiredClientCapabilities (-32021) MUST
|
||||
// return HTTP 400.
|
||||
func extractErrorStatus(ctx context.Context, msg jsonrpc.Message) int {
|
||||
if protocolVersionFromContext(ctx) < protocolVersion20260728 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue