mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 18:26:38 +00:00
Improve MCP error handling for Cloudflare Workers environment
Enhanced error messages to clearly indicate that stdio MCP servers require Node.js child_process which is not available in Workers. Provides better guidance to users about using SSE-based servers instead. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
c53e3214c1
commit
eeef340323
@ -105,6 +105,9 @@ async function createStdioClient(serverName: string, config: ServerConfig): Prom
|
||||
if (e instanceof Error && e.message.includes('Missing')) {
|
||||
throw new Error(`MCP stdio transport not available. Please use SSE-based servers instead. See: https://modelcontextprotocol.io/examples`);
|
||||
}
|
||||
if (e instanceof Error && e.message.includes('child_process.spawn is not implemented')) {
|
||||
throw new Error(`Stdio MCP servers require Node.js child_process which is not available in this environment. Please use SSE-based servers instead. See: https://modelcontextprotocol.io/examples`);
|
||||
}
|
||||
throw new Error(`Failed to start command "${command}": ${errorToString(e)}`);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user