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

@ -331,13 +331,11 @@ func clientSessionMethod[P Params, R Result](f func(*ClientSession, context.Cont
// Error codes
const (
// TODO: should these be unexported?
CodeResourceNotFound = -32002
codeResourceNotFound = -32002
// The error code if the method exists and was called properly, but the peer does not support it.
CodeUnsupportedMethod = -31001
codeUnsupportedMethod = -31001
// The error code for invalid parameters
CodeInvalidParams = -32602
codeInvalidParams = -32602
)
// notifySessions calls Notify on all the sessions.