feat: added improved error messaging on MCP server initialization
This commit is contained in:
+6
-2
@@ -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)?
|
||||||
|
|||||||
Reference in New Issue
Block a user