fix(core): clean up mcp event surface (#35221)
This commit is contained in:
@@ -46,7 +46,11 @@ const TolerantListPromptsResult = ListPromptsResultSchema.extend({
|
||||
|
||||
export class NeedsAuthError extends Schema.TaggedErrorClass<NeedsAuthError>()("MCP.NeedsAuthError", {
|
||||
server: Schema.String,
|
||||
}) {}
|
||||
}) {
|
||||
override get message() {
|
||||
return `MCP server requires authentication: ${this.server}`
|
||||
}
|
||||
}
|
||||
|
||||
export class ConnectError extends Schema.TaggedErrorClass<ConnectError>()("MCP.ConnectError", {
|
||||
server: Schema.String,
|
||||
|
||||
@@ -127,7 +127,11 @@ export class ResourceContent extends Schema.Class<ResourceContent>("MCP.Resource
|
||||
|
||||
export class NotFoundError extends Schema.TaggedErrorClass<NotFoundError>()("MCP.NotFoundError", {
|
||||
server: ServerName,
|
||||
}) {}
|
||||
}) {
|
||||
override get message() {
|
||||
return `MCP server not found: ${this.server}`
|
||||
}
|
||||
}
|
||||
|
||||
export class ToolCallError extends Schema.TaggedErrorClass<ToolCallError>()("MCP.ToolCallError", {
|
||||
server: ServerName,
|
||||
|
||||
Reference in New Issue
Block a user