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 | 6 | import { |
| 7 | 7 | McpConnectionError, |
| 8 | − McpInvocationError, | |
| 9 | 8 | McpOAuthError, |
| 10 | 9 | McpToolDiscoveryError, |
| 11 | 10 | } from "../sdk/errors"; |
| @@ -219,10 +218,12 @@ export class McpGroup extends HttpApiGroup.make("mcp") · 207 unmodified lines | ||
| 219 | 218 | ) |
| 220 | 219 | // Errors declared once at the group level — every endpoint inherits. |
| 221 | 220 | // Plugin domain errors carry their own HttpApiSchema status (4xx); |
| 222 | − // `InternalError` is the shared opaque 500 for anything storage-side | |
| 223 | − // captured to telemetry by the SDK boundary. | |
| 221 | + // `InternalError` is the shared opaque 500 translated at the HTTP | |
| 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 | 226 | .addError(InternalError) |
| 225 | 227 | .addError(McpOAuthError) |
| 226 | 228 | .addError(McpConnectionError) |
| 227 | − .addError(McpToolDiscoveryError) | |
| 228 | − .addError(McpInvocationError) {} | |
| 229 | + .addError(McpToolDiscoveryError) {} | |
| @@ -26,7 +26,6 @@ import { · 25 unmodified lines | ||
| 26 | 26 | import { discoverTools } from "./discover"; |
| 27 | 27 | import { |
| 28 | 28 | McpConnectionError, |
| 29 | − McpInvocationError, | |
| 30 | 29 | McpOAuthError, |
| 31 | 30 | McpToolDiscoveryError, |
| 32 | 31 | } from "./errors"; |
| @@ -954,7 +953,6 @@ export type McpExtensionFailure = · 921 unmodified lines | ||
| 954 | 953 | | McpOAuthError |
| 955 | 954 | | McpConnectionError |
| 956 | 955 | | McpToolDiscoveryError |
| 957 | − | McpInvocationError | |
| 958 | 956 | | StorageFailure; |
| 959 | 957 | |
| 960 | 958 | export interface McpPluginExtension { |