zeroclaw-labs/zeroclaw · error · anyhow::Error
ms365: onedrive_download failed ({status}, code={code})
Error message
ms365: onedrive_download failed ({status}, code={code}) What it means
Error "ms365: onedrive_download failed ({status}, code={code})" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at crates/zeroclaw-tools/src/microsoft365/graph_client.rs:350
let resp = client
.get(&url)
.bearer_auth(token)
.send()
.await
.context("ms365: onedrive_download 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: onedrive_download raw error body"
);
anyhow::bail!("ms365: onedrive_download failed ({status}, code={code})");
}
let bytes = resp
.bytes()
.await
.context("ms365: failed to read download body")?;
if bytes.len() > max_size {
anyhow::bail!(
"ms365: downloaded file exceeds max_size ({} > {max_size})",
bytes.len()
);
}
Ok(bytes.to_vec())
}
/// Search SharePoint for documents matching a query.
pub async fn sharepoint_search(View on GitHub (pinned to 88bb9c8533)
Solutions
- Check the Graph error code; verify the OneDrive item ID and Files.Read permission.
When it happens
Trigger: Thrown at crates/zeroclaw-tools/src/microsoft365/graph_client.rs:350 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/4cf11bde8336c506.
Report an issue: GitHub.