{"record":{"id":"229340faf25b669a","repo":"Hmbown/CodeWhale","slug":"failed-to-read-mcp-config","errorCode":null,"errorMessage":"Failed to read MCP config {}: {}","messagePattern":"Failed to read MCP config (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/lib.rs","lineNumber":8733,"sourceCode":"            println!(\"  command: {exe_str}\");\n            println!(\n                \"  args:    serve --mcp{}\",\n                workspace.map_or(String::new(), |ws| format!(\" --workspace {ws}\"))\n            );\n            println!();\n            println!(\"Tip: Use `codewhale mcp validate` to test the connection.\");\n            println!(\"     Use `codewhale serve --http` for the HTTP/SSE runtime API instead.\");\n            Ok(())\n        }\n    }\n}\n\nfn load_mcp_config(path: &Path) -> Result<McpConfig> {\n    if !path.exists() {\n        return Ok(McpConfig::default());\n    }\n    let contents = std::fs::read_to_string(path)\n        .map_err(|e| anyhow::anyhow!(\"Failed to read MCP config {}: {}\", path.display(), e))?;\n    let cfg: McpConfig = serde_json::from_str(&contents).map_err(|_| {\n        anyhow::anyhow!(\n            \"Failed to parse MCP config {}; file contents were omitted\",\n            codewhale_config::quote_os_path(path)\n        )\n    })?;\n    Ok(cfg)\n}\n\n/// Diagnostic status for an MCP server entry.\n#[derive(Debug)]\nenum McpServerDoctorStatus {\n    Ok(String),\n    Warning(String),\n    Error(String),\n}\n\nimpl McpServerDoctorStatus {","sourceCodeStart":8715,"sourceCodeEnd":8751,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/8880682c63083a91624de936797efa3ce9e498fd/crates/tui/src/lib.rs#L8715-L8751","documentation":"Error \"Failed to read MCP config {}: {}\" thrown in Hmbown/CodeWhale.","triggerScenarios":"Thrown at crates/tui/src/lib.rs:8733 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8880682c63083a91624de936797efa3ce9e498fd","analyzedAt":"2026-08-16T11:31:27.956Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}