summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorN. Taylor Mullen <[email protected]>2025-07-19 12:44:51 -0700
committerGitHub <[email protected]>2025-07-19 12:44:51 -0700
commit412b78c5ab4138db286f3fbb7630474448e32c0e (patch)
tree06ebea2f779b8fab948cbf5d52ade2043828a1ee
parent73d5d988f532e70aa8aa22b5488a2f080a8bd28c (diff)
Simplify MCP connection errors. (#4508)
-rw-r--r--packages/core/src/tools/mcp-client.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/core/src/tools/mcp-client.ts b/packages/core/src/tools/mcp-client.ts
index 7e6b11c1..cb191b0d 100644
--- a/packages/core/src/tools/mcp-client.ts
+++ b/packages/core/src/tools/mcp-client.ts
@@ -26,6 +26,7 @@ import {
IDE_SERVER_NAME,
ideContext,
} from '../services/ideContext.js';
+import { getErrorMessage } from '../utils/errors.js';
export const MCP_DEFAULT_TIMEOUT_MSEC = 10 * 60 * 1000; // default to 10 minutes
@@ -242,7 +243,9 @@ export async function connectAndDiscover(
throw error;
}
} catch (error) {
- console.error(`Error connecting to MCP server '${mcpServerName}':`, error);
+ console.error(
+ `Error connecting to MCP server '${mcpServerName}': ${getErrorMessage(error)}`,
+ );
updateMCPServerStatus(mcpServerName, MCPServerStatus.DISCONNECTED);
}
}