{"record":{"id":"17488a7812591731","repo":"openai/codex","slug":"secret-file-must-not-be-empty","errorCode":null,"errorMessage":"secret_file must not be empty","messagePattern":"secret_file must not be empty","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/network-proxy/src/mitm_hook.rs","lineNumber":634,"sourceCode":"            }\n            _ => {\n                return Err(anyhow!(\n                    \"expected exactly one of secret_env_var or secret_file\"\n                ));\n            }\n        }\n    }\n    Ok(())\n}\n\nfn parse_header_name(name: &str) -> Result<HeaderName> {\n    HeaderName::from_bytes(name.as_bytes())\n        .map_err(|err| anyhow!(\"invalid header name {name:?}: {err}\"))\n}\n\nfn parse_secret_file(path: &str) -> Result<AbsolutePathBuf> {\n    if path.trim().is_empty() {\n        return Err(anyhow!(\"secret_file must not be empty\"));\n    }\n    let path = Path::new(path);\n    if !path.is_absolute() {\n        return Err(anyhow!(\"secret_file must be an absolute path: {path:?}\"));\n    }\n    AbsolutePathBuf::from_absolute_path(path)\n        .with_context(|| format!(\"secret_file must be an absolute path: {path:?}\"))\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use crate::NetworkMode;\n    use crate::config::NetworkProxyConfig;\n    use pretty_assertions::assert_eq;\n    use rama_http::Body;\n    use rama_http::Method;\n    use tempfile::NamedTempFile;","sourceCodeStart":616,"sourceCodeEnd":652,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/network-proxy/src/mitm_hook.rs#L616-L652","documentation":"Error \"secret_file must not be empty\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/network-proxy/src/mitm_hook.rs:634 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":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}