{"record":{"id":"46a13aabc2aafa53","repo":"zeroclaw-labs/zeroclaw","slug":"mcp-servers-i-url-must-use-https-when-tls-ca-ce","errorCode":null,"errorMessage":"mcp.servers[{i}].url must use https when tls_ca_cert_path is set","messagePattern":"mcp\\.servers\\[(.+?)\\]\\.url must use https when tls_ca_cert_path is set","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-config/src/schema.rs","lineNumber":10154,"sourceCode":"                    })?;\n                let parsed = reqwest::Url::parse(url)\n                    .with_context(|| format!(\"mcp.servers[{i}].url is not a valid URL\"))?;\n                if !matches!(parsed.scheme(), \"http\" | \"https\") {\n                    anyhow::bail!(\"mcp.servers[{i}].url must use http/https\");\n                }\n                if let Some(ca_path) = server.tls_ca_cert_path.as_deref() {\n                    if ca_path.trim().is_empty() {\n                        validation_bail!(\n                            RequiredFieldEmpty,\n                            format!(\"mcp.servers[{i}].tls_ca_cert_path\"),\n                            \"mcp.servers[{i}].tls_ca_cert_path must not be empty\"\n                        );\n                    }\n                    if !std::path::Path::new(ca_path).is_absolute() {\n                        anyhow::bail!(\"mcp.servers[{i}].tls_ca_cert_path must be an absolute path\");\n                    }\n                    if parsed.scheme() != \"https\" {\n                        anyhow::bail!(\n                            \"mcp.servers[{i}].url must use https when tls_ca_cert_path is set\"\n                        );\n                    }\n                }\n            }\n        }\n    }\n    Ok(())\n}\n\nfn validate_proxy_url(field: &str, url: &str) -> Result<()> {\n    let parsed = reqwest::Url::parse(url)\n        .with_context(|| format!(\"Invalid {field} URL: '{url}' is not a valid URL\"))?;\n\n    match parsed.scheme() {\n        \"http\" | \"https\" | \"socks5\" | \"socks5h\" | \"socks\" => {}\n        scheme => {\n            anyhow::bail!(","sourceCodeStart":10136,"sourceCodeEnd":10172,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-config/src/schema.rs#L10136-L10172","documentation":"Error \"mcp.servers[{i}].url must use https when tls_ca_cert_path is set\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-config/src/schema.rs:10154 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Switch the MCP server URL to https when a custom CA certificate is configured."],"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"}