mcp: export session missing error (#771)

Fix: #715

- export session missing error
- modify `errSessionMissing` to `ErrSessionMissing`
- add unit test about session missing error
This commit is contained in:
FanOne 2026-02-03 22:46:49 +08:00 • committed by GitHub
commit 7ecd8049c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,6 +24,10 @@ import (
// is closed or in the process of closing.
var ErrConnectionClosed = errors.New("connection closed")
// ErrSessionMissing is returned when the session is known to not be present on
// the server.
var ErrSessionMissing = errors.New("session not found")
// A Transport is used to create a bidirectional connection between MCP client
// and server.
//