Nothing in the MCP extension methods ever emits McpInvocationError; it can only surface from the plugin's invokeTool callback, which is reached via the core tools.invoke endpoint, not an MCP-group endpoint. Keep the class around (still used inside invoke.ts) but stop claiming the group or the extension type surfaces it.
Unified · Split
| @@ -5,7 +5,6 @@ import { InternalError } from "@executor/api"; · 4 unmodified lines | |||
| 5 | 5 | ||
| 6 | import { | 6 | import { |
| 7 | McpConnectionError, | 7 | McpConnectionError, |
| 8 | McpInvocationError, | ||
| 9 | McpOAuthError, | 8 | McpOAuthError, |
| 10 | McpToolDiscoveryError, | 9 | McpToolDiscoveryError, |
| 11 | } from "../sdk/errors"; | 10 | } from "../sdk/errors"; |
| @@ -219,10 +218,12 @@ export class McpGroup extends HttpApiGroup.make("mcp") · 207 unmodified lines | |||
| 219 | ) | 218 | ) |
| 220 | // Errors declared once at the group level — every endpoint inherits. | 219 | // Errors declared once at the group level — every endpoint inherits. |
| 221 | // Plugin domain errors carry their own HttpApiSchema status (4xx); | 220 | // Plugin domain errors carry their own HttpApiSchema status (4xx); |
| 222 | // `InternalError` is the shared opaque 500 for anything storage-side | 221 | // `InternalError` is the shared opaque 500 translated at the HTTP |
| 223 | // captured to telemetry by the SDK boundary. | 222 | // edge by `withStorageCapture`. We only list errors an MCP *group* |
| 223 | // endpoint can surface: `McpInvocationError` is thrown inside | ||
| 224 | // `invokeTool` which is reached via the core `tools.invoke` | ||
| 225 | // endpoint, not any MCP-group endpoint, so it doesn't belong here. | ||
| 224 | .addError(InternalError) | 226 | .addError(InternalError) |
| 225 | .addError(McpOAuthError) | 227 | .addError(McpOAuthError) |
| 226 | .addError(McpConnectionError) | 228 | .addError(McpConnectionError) |
| 227 | .addError(McpToolDiscoveryError) | 229 | .addError(McpToolDiscoveryError) {} |
| 228 | .addError(McpInvocationError) {} | ||
| @@ -26,7 +26,6 @@ import { · 25 unmodified lines | |||
| 26 | import { discoverTools } from "./discover"; | 26 | import { discoverTools } from "./discover"; |
| 27 | import { | 27 | import { |
| 28 | McpConnectionError, | 28 | McpConnectionError, |
| 29 | McpInvocationError, | ||
| 30 | McpOAuthError, | 29 | McpOAuthError, |
| 31 | McpToolDiscoveryError, | 30 | McpToolDiscoveryError, |
| 32 | } from "./errors"; | 31 | } from "./errors"; |
| @@ -954,7 +953,6 @@ export type McpExtensionFailure = · 921 unmodified lines | |||
| 954 | | McpOAuthError | 953 | | McpOAuthError |
| 955 | | McpConnectionError | 954 | | McpConnectionError |
| 956 | | McpToolDiscoveryError | 955 | | McpToolDiscoveryError |
| 957 | | McpInvocationError | ||
| 958 | | StorageFailure; | 956 | | StorageFailure; |
| 959 | 957 | ||
| 960 | export interface McpPluginExtension { | 958 | export interface McpPluginExtension { |