{"record":{"id":"a286858424422da0","repo":"zeroclaw-labs/zeroclaw","slug":"ms365-calendar-event-delete-failed-status-cod","errorCode":null,"errorMessage":"ms365: calendar_event_delete failed ({status}, code={code})","messagePattern":"ms365: calendar_event_delete failed \\((.+?), code=(.+?)\\)","errorType":"http","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-tools/src/microsoft365/graph_client.rs","lineNumber":287,"sourceCode":"\n    let resp = client\n        .delete(&url)\n        .bearer_auth(token)\n        .send()\n        .await\n        .context(\"ms365: calendar_event_delete request failed\")?;\n\n    if !resp.status().is_success() {\n        let status = resp.status();\n        let body = resp.text().await.unwrap_or_default();\n        let code = extract_graph_error_code(&body).unwrap_or_else(|| \"unknown\".to_string());\n        ::zeroclaw_log::record!(\n            DEBUG,\n            ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Note)\n                .with_attrs(::serde_json::json!({\"body\": body})),\n            \"ms365: calendar_event_delete raw error body\"\n        );\n        anyhow::bail!(\"ms365: calendar_event_delete failed ({status}, code={code})\");\n    }\n\n    Ok(())\n}\n\n/// List children of a OneDrive folder.\npub async fn onedrive_list(\n    client: &reqwest::Client,\n    token: &str,\n    user_id: &str,\n    path: Option<&str>,\n) -> anyhow::Result<serde_json::Value> {\n    let base = user_path(user_id);\n    let url = match path {\n        Some(p) if !p.is_empty() => {\n            let encoded = urlencoding::encode(p);\n            format!(\"{GRAPH_BASE}{base}/drive/root:/{encoded}:/children\")\n        }","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-tools/src/microsoft365/graph_client.rs#L269-L305","documentation":"Error \"ms365: calendar_event_delete failed ({status}, code={code})\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-tools/src/microsoft365/graph_client.rs:287 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the Graph error code; verify the event ID and calendar permissions."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}