{"record":{"id":"018e7f8a51b10530","repo":"openai/codex","slug":"request-blocked-by-network-policy","errorCode":null,"errorMessage":"Request blocked by network policy.","messagePattern":"Request blocked by network policy\\.","errorType":"exception","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/network-proxy/src/socks5.rs","lineNumber":810,"sourceCode":"    port: u16,\n    client_addr: Option<&str>,\n) {\n    emit_block_decision_audit_event(\n        state,\n        BlockDecisionAuditEventArgs {\n            source,\n            reason,\n            protocol,\n            server_address: host,\n            server_port: port,\n            method: None,\n            client_addr,\n        },\n    );\n}\n\nfn policy_denied_error(reason: &str, details: &PolicyDecisionDetails<'_>) -> io::Error {\n    io::Error::new(\n        io::ErrorKind::PermissionDenied,\n        blocked_message_with_policy(reason, details),\n    )\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use crate::config::NetworkMode;\n    use crate::config::NetworkProxyConfig;\n    use crate::mitm_hook::MitmHookConfig;\n    use crate::mitm_hook::MitmHookMatchConfig;\n    use crate::network_policy::test_support::POLICY_DECISION_EVENT_NAME;\n    use crate::network_policy::test_support::capture_events;\n    use crate::network_policy::test_support::find_event_by_name;\n    use crate::runtime::ConfigReloader;\n    use crate::runtime::ConfigReloaderFuture;\n    use crate::runtime::ConfigState;","sourceCodeStart":792,"sourceCodeEnd":828,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/network-proxy/src/socks5.rs#L792-L828","documentation":"Error \"Request blocked by network policy.\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/network-proxy/src/socks5.rs:810 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"}