mcp: unexport incidentally exported error codes (#536)
Unexport error codes that were accidentally exported. I don't think it's possible that they could be useful for users (see #535). Fixes #535
This commit is contained in:
parent
964574b818
commit
b2048cd73a
1 changed files with 21 additions and 23 deletions
|
|
@ -526,7 +526,7 @@ func (s *Server) getPrompt(ctx context.Context, req *GetPromptRequest) (*GetProm
|
|||
if !ok {
|
||||
// Return a proper JSON-RPC error with the correct error code
|
||||
return nil, &jsonrpc2.WireError{
|
||||
Code: CodeInvalidParams,
|
||||
Code: codeInvalidParams,
|
||||
Message: fmt.Sprintf("unknown prompt %q", req.Params.Name),
|
||||
}
|
||||
}
|
||||
|
|
@ -553,7 +553,7 @@ func (s *Server) callTool(ctx context.Context, req *CallToolRequest) (*CallToolR
|
|||
s.mu.Unlock()
|
||||
if !ok {
|
||||
return nil, &jsonrpc2.WireError{
|
||||
Code: CodeInvalidParams,
|
||||
Code: codeInvalidParams,
|
||||
Message: fmt.Sprintf("unknown tool %q", req.Params.Name),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue