zeroclaw-labs/zeroclaw · error
Email OAuth2 device-code expired
Error message
Email OAuth2 device-code expired
What it means
Error "Email OAuth2 device-code expired" thrown in zeroclaw-labs/zeroclaw.
Source
Thrown at crates/zeroclaw-providers/src/auth/email_oauth2.rs:163
.await
.context("Failed polling email OAuth2 token endpoint")?;
if response.status().is_success() {
return parse_token_response(response).await;
}
let status = response.status();
let text = response.text().await.unwrap_or_default();
if let Ok(err) = serde_json::from_str::<OAuthErrorResponse>(&text) {
match err.error.as_str() {
"authorization_pending" => continue,
"slow_down" => {
interval_secs = interval_secs.saturating_add(5);
continue;
}
"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}");
}
View on GitHub (pinned to 88bb9c8533)
Solutions
- Restart the device-code flow and enter the code before it expires.
When it happens
Trigger: Thrown at crates/zeroclaw-providers/src/auth/email_oauth2.rs:163 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/7e72f4c09f90a574.
Report an issue: GitHub.