{"record":{"id":"c772dae4d2e78868","repo":"zeroclaw-labs/zeroclaw","slug":"mcp-server-tls-ca-certificate-path-must-name","errorCode":null,"errorMessage":"MCP server `{}`: TLS CA certificate path must name a regular file: `{path}`","messagePattern":"MCP server `(.+?)`: TLS CA certificate path must name a regular file: `(.+?)`","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-tools/src/mcp_transport.rs","lineNumber":137,"sourceCode":"    }\n    options.open(path)\n}\n\nfn load_tls_ca_pem(config: &McpServerConfig, path: &str) -> Result<Vec<u8>> {\n    let file = open_tls_ca_file(path).with_context(|| {\n        format!(\n            \"MCP server `{}`: cannot read TLS CA certificate at `{path}`\",\n            config.name\n        )\n    })?;\n    let opened_metadata = file.metadata().with_context(|| {\n        format!(\n            \"MCP server `{}`: cannot inspect opened TLS CA certificate at `{path}`\",\n            config.name\n        )\n    })?;\n    if !opened_metadata.file_type().is_file() {\n        bail!(\n            \"MCP server `{}`: TLS CA certificate path must name a regular file: `{path}`\",\n            config.name\n        );\n    }\n    if opened_metadata.len() > MAX_TLS_CA_BYTES as u64 {\n        bail!(\n            \"MCP server `{}`: TLS CA certificate at `{path}` exceeds the {MAX_TLS_CA_BYTES}-byte limit\",\n            config.name\n        );\n    }\n\n    let mut pem = Vec::with_capacity(opened_metadata.len() as usize + 1);\n    file.take(MAX_TLS_CA_BYTES as u64 + 1)\n        .read_to_end(&mut pem)\n        .with_context(|| {\n            format!(\n                \"MCP server `{}`: cannot read TLS CA certificate at `{path}`\",\n                config.name","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/mcp_transport.rs#L119-L155","documentation":"Error \"MCP server `{}`: TLS CA certificate path must name a regular file: `{path}`\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-tools/src/mcp_transport.rs:137 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Point tls_ca_cert_path at a regular PEM file, not a directory or special file."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}