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:
Robert Findley 2025-09-26 14:04:28 -04:00 • committed by GitHub
commit b2048cd73a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -41,7 +41,7 @@ type ResourceHandler func(context.Context, *ReadResourceRequest) (*ReadResourceR
// not be found.
func ResourceNotFoundError(uri string) error {
return &jsonrpc2.WireError{
Code: CodeResourceNotFound,
Code: codeResourceNotFound,
Message: "Resource not found",
Data: json.RawMessage(fmt.Sprintf(`{"uri":%q}`, uri)),
}