mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 08:47:44 +00:00
Simplify MCP connection errors. (#4508)
This commit is contained in:
@@ -26,6 +26,7 @@ import {
|
|||||||
IDE_SERVER_NAME,
|
IDE_SERVER_NAME,
|
||||||
ideContext,
|
ideContext,
|
||||||
} from '../services/ideContext.js';
|
} from '../services/ideContext.js';
|
||||||
|
import { getErrorMessage } from '../utils/errors.js';
|
||||||
|
|
||||||
export const MCP_DEFAULT_TIMEOUT_MSEC = 10 * 60 * 1000; // default to 10 minutes
|
export const MCP_DEFAULT_TIMEOUT_MSEC = 10 * 60 * 1000; // default to 10 minutes
|
||||||
|
|
||||||
@@ -242,7 +243,9 @@ export async function connectAndDiscover(
|
|||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
} catch (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);
|
updateMCPServerStatus(mcpServerName, MCPServerStatus.DISCONNECTED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user