{"record":{"id":"c2b749eca7f0aaaa","repo":"openai/codex","slug":"invalid-value-for-field-name-candidate-allow","errorCode":null,"errorMessage":"invalid value for {field_name}: {candidate} (allowed {allowed})","messagePattern":"invalid value for (.+?): (.+?) \\(allowed (.+?)\\)","errorType":"validation","errorClass":"NetworkProxyConstraintError","httpStatus":null,"severity":"error","filePath":"codex-rs/network-proxy/src/state.rs","lineNumber":429,"sourceCode":"    patterns: &[String],\n) -> Result<(), NetworkProxyConstraintError> {\n    if let Some(pattern) = patterns\n        .iter()\n        .find(|pattern| is_global_wildcard_domain_pattern(pattern))\n    {\n        return Err(NetworkProxyConstraintError::InvalidValue {\n            field_name,\n            candidate: pattern.trim().to_string(),\n            allowed: \"exact hosts or scoped wildcards like *.example.com or **.example.com\"\n                .to_string(),\n        });\n    }\n    Ok(())\n}\n\n#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]\npub enum NetworkProxyConstraintError {\n    #[error(\"invalid value for {field_name}: {candidate} (allowed {allowed})\")]\n    InvalidValue {\n        field_name: &'static str,\n        candidate: String,\n        allowed: String,\n    },\n}\n\nimpl NetworkProxyConstraintError {\n    pub fn into_anyhow(self) -> anyhow::Error {\n        anyhow::anyhow!(self)\n    }\n}\n\nfn network_mode_rank(mode: NetworkMode) -> u8 {\n    match mode {\n        NetworkMode::Limited => 0,\n        NetworkMode::Full => 1,\n    }","sourceCodeStart":411,"sourceCodeEnd":447,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/network-proxy/src/state.rs#L411-L447","documentation":"Validation error in build_config_state: credential_broker is enabled in NetworkProxyConfig while network.mitm is false. Brokered credential virtualization works by rewriting requests inside the MITM inspector, so it is meaningless without MITM and the combination is rejected.","triggerScenarios":"Thrown at codex-rs/network-proxy/src/state.rs:429 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set network.mitm = true to use network.credential_broker","Disable credential_broker if MITM interception is not wanted"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}