feat: added improved error messaging on MCP server initialization
CI / All (macos-latest) (push) Waiting to run
CI / All (windows-latest) (push) Waiting to run
CI / All (ubuntu-latest) (push) Failing after 26s

This commit is contained in:
2026-07-02 11:42:12 -06:00
parent 81b4f6a76e
commit cd1b043b1e
+6 -2
View File
@@ -433,8 +433,12 @@ async fn spawn_stdio_mcp_server(
let log_file = OpenOptions::new() let log_file = OpenOptions::new()
.create(true) .create(true)
.append(true) .append(true)
.open(log_path)?; .open(log_path)
let (transport, _) = TokioChildProcess::builder(cmd).stderr(log_file).spawn()?; .with_context(|| format!("Failed to open MCP log file at '{}'", log_path.display()))?;
let (transport, _) = TokioChildProcess::builder(cmd)
.stderr(log_file)
.spawn()
.with_context(|| format!("Failed to spawn MCP server: {command}"))?;
transport transport
} else { } else {
TokioChildProcess::new(cmd)? TokioChildProcess::new(cmd)?