zeroclaw-labs/zeroclaw · error · anyhow::Error
ms365: mail_send failed ({status}, code={code})
Error message
ms365: mail_send failed ({status}, code={code}) What it means
Error "ms365: mail_send failed ({status}, code={code})" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at crates/zeroclaw-tools/src/microsoft365/graph_client.rs:98
let resp = client
.post(&url)
.bearer_auth(token)
.json(&payload)
.send()
.await
.context("ms365: mail_send 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: mail_send raw error body"
);
anyhow::bail!("ms365: mail_send failed ({status}, code={code})");
}
Ok(())
}
/// List messages in a Teams channel.
pub async fn teams_message_list(
client: &reqwest::Client,
token: &str,
team_id: &str,
channel_id: &str,
top: u32,
) -> anyhow::Result<serde_json::Value> {
let url = format!(
"{GRAPH_BASE}/teams/{}/channels/{}/messages",
encode_path_segment(team_id),
encode_path_segment(channel_id)
);View on GitHub (pinned to 88bb9c8533)
Solutions
- Check the Graph error code; verify Mail.Send permission and recipient addresses.
When it happens
Trigger: Thrown at crates/zeroclaw-tools/src/microsoft365/graph_client.rs:98 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/ec735c504640661f.
Report an issue: GitHub.