zeroclaw-labs/zeroclaw · error · anyhow::Error

ms365: calendar_event_delete failed ({status}, code={code})

Error message

ms365: calendar_event_delete failed ({status}, code={code})

What it means

Error "ms365: calendar_event_delete failed ({status}, code={code})" thrown in zeroclaw-labs/zeroclaw.

Source

Thrown at crates/zeroclaw-tools/src/microsoft365/graph_client.rs:287

    let resp = client
        .delete(&url)
        .bearer_auth(token)
        .send()
        .await
        .context("ms365: calendar_event_delete request failed")?;

    if !resp.status().is_success() {
        let status = resp.status();
        let body = resp.text().await.unwrap_or_default();
        let code = extract_graph_error_code(&body).unwrap_or_else(|| "unknown".to_string());
        ::zeroclaw_log::record!(
            DEBUG,
            ::zeroclaw_log::Event::new(module_path!(), ::zeroclaw_log::Action::Note)
                .with_attrs(::serde_json::json!({"body": body})),
            "ms365: calendar_event_delete raw error body"
        );
        anyhow::bail!("ms365: calendar_event_delete failed ({status}, code={code})");
    }

    Ok(())
}

/// List children of a OneDrive folder.
pub async fn onedrive_list(
    client: &reqwest::Client,
    token: &str,
    user_id: &str,
    path: Option<&str>,
) -> anyhow::Result<serde_json::Value> {
    let base = user_path(user_id);
    let url = match path {
        Some(p) if !p.is_empty() => {
            let encoded = urlencoding::encode(p);
            format!("{GRAPH_BASE}{base}/drive/root:/{encoded}:/children")
        }

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Check the Graph error code; verify the event ID and calendar permissions.

When it happens

Trigger: Thrown at crates/zeroclaw-tools/src/microsoft365/graph_client.rs:287 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/a286858424422da0. Report an issue: GitHub.