{"record":{"id":"d9b52bae10f4bd54","repo":"openai/codex","slug":"operation-failed","errorCode":null,"errorMessage":"{operation} failed: {}","messagePattern":"(.+?) failed: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/windows-sandbox-rs/src/wfp.rs","lineNumber":363,"sourceCode":"/// Deletes an old copy of a filter before re-adding it.\nfn delete_filter_if_present(engine: HANDLE, key: &GUID) -> Result<()> {\n    let result = unsafe { FwpmFilterDeleteByKey0(engine, key) };\n    ensure_success_or(\n        result,\n        \"FwpmFilterDeleteByKey0\",\n        &[FWP_E_FILTER_NOT_FOUND as u32, FWP_E_NOT_FOUND as u32],\n    )\n}\n\nfn ensure_success(result: u32, operation: &str) -> Result<()> {\n    ensure_success_or(result, operation, &[])\n}\n\nfn ensure_success_or(result: u32, operation: &str, allowed: &[u32]) -> Result<()> {\n    if result == 0 || allowed.contains(&result) {\n        Ok(())\n    } else {\n        Err(anyhow::anyhow!(\n            \"{operation} failed: {}\",\n            format_error_code(result)\n        ))\n    }\n}\n\nfn format_error_code(result: u32) -> String {\n    format!(\"0x{result:08X}\")\n}\n\nfn empty_blob() -> FWP_BYTE_BLOB {\n    FWP_BYTE_BLOB {\n        size: 0,\n        data: null_mut(),\n    }\n}\n\nfn empty_value() -> FWP_VALUE0 {","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/windows-sandbox-rs/src/wfp.rs#L345-L381","documentation":"Error \"{operation} failed: {}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/windows-sandbox-rs/src/wfp.rs:363 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run with administrator or elevated privileges so Windows Filtering Platform operations succeed; inspect the inner error for the failing operation."],"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"}