{"record":{"id":"8675bbfe4d732fa7","repo":"openai/codex","slug":"operation-error","errorCode":null,"errorMessage":"{operation}: {error}","messagePattern":"\\{operation\\}: \\{error\\}","errorType":"exception","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/network-proxy/src/windows_tcp_attribution.rs","lineNumber":305,"sourceCode":"    if byte_len == 0 {\n        return Err(io::Error::new(\n            io::ErrorKind::InvalidData,\n            \"Windows API returned an empty buffer length\",\n        ));\n    }\n    Ok(vec![0; byte_len.div_ceil(size_of::<usize>())])\n}\n\nfn owned_handle(handle: HANDLE, operation: &str) -> io::Result<OwnedHandle> {\n    if handle == 0 {\n        return Err(last_error(operation));\n    }\n    Ok(unsafe { OwnedHandle::from_raw_handle(handle as RawHandle) })\n}\n\nfn win32_error(operation: &str, error_code: u32) -> io::Error {\n    let error = io::Error::from_raw_os_error(error_code as i32);\n    io::Error::new(error.kind(), format!(\"{operation}: {error}\"))\n}\n\nfn last_error(operation: &str) -> io::Error {\n    let error = io::Error::last_os_error();\n    io::Error::new(error.kind(), format!(\"{operation}: {error}\"))\n}\n\n#[cfg(test)]\n#[path = \"windows_tcp_attribution_tests.rs\"]\nmod tests;\n","sourceCodeStart":287,"sourceCodeEnd":316,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/network-proxy/src/windows_tcp_attribution.rs#L287-L316","documentation":"Error \"{operation}: {error}\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/network-proxy/src/windows_tcp_attribution.rs:305 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"}