zeroclaw-labs/zeroclaw · error
Email OAuth2 token request failed ({status}): {body}
Error message
Email OAuth2 token request failed ({status}): {body} What it means
Error "Email OAuth2 token request failed ({status}): {body}" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at crates/zeroclaw-providers/src/auth/email_oauth2.rs:179
}
"access_denied" => anyhow::bail!("Email OAuth2 authorization was denied"),
"expired_token" => anyhow::bail!("Email OAuth2 device-code expired"),
_ => anyhow::bail!(
"Email OAuth2 device-code polling failed ({status}): {}",
err.error_description.unwrap_or(err.error)
),
}
}
anyhow::bail!("Email OAuth2 device-code polling failed ({status}): {text}");
}
}
async fn parse_token_response(response: reqwest::Response) -> Result<TokenSet> {
if !response.status().is_success() {
let status = response.status();
let body = response.text().await.unwrap_or_default();
anyhow::bail!("Email OAuth2 token request failed ({status}): {body}");
}
let token: TokenResponse = response
.json()
.await
.context("Failed to parse email OAuth2 token response")?;
let expires_at = token.expires_in.and_then(|seconds| {
if seconds <= 0 {
None
} else {
Some(Utc::now() + chrono::Duration::seconds(seconds))
}
});
Ok(TokenSet {
access_token: token.access_token,
refresh_token: token.refresh_token,View on GitHub (pinned to 88bb9c8533)
Solutions
- Check the token endpoint status/body; verify client credentials and the device code are still valid.
When it happens
Trigger: Thrown at crates/zeroclaw-providers/src/auth/email_oauth2.rs:179 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/4016b961e8b80de8.
Report an issue: GitHub.