Added sandbox error hint when MCP servers fail to launch in sandbox mode (#972)

This commit is contained in:
Mark McDonald 2025-06-16 14:37:09 +08:00 committed by GitHub
parent 6af7a5c589
commit 7e6fb7e874
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 3 deletions

View File

@ -223,10 +223,13 @@ async function connectAndDiscover(
// Exclude args and env which may contain sensitive data
};
console.error(
let errorString =
`failed to start or connect to MCP server '${mcpServerName}' ` +
`${JSON.stringify(safeConfig)}; \n${error}`,
);
`${JSON.stringify(safeConfig)}; \n${error}`;
if (process.env.SANDBOX) {
errorString += `\nMake sure it is available in the sandbox`;
}
console.error(errorString);
// Update status to disconnected
updateMCPServerStatus(mcpServerName, MCPServerStatus.DISCONNECTED);
return;