{"record":{"id":"0f3daa265a900b10","repo":"zeroclaw-labs/zeroclaw","slug":"email-oauth2-device-code-polling-failed-status-0f3daa","errorCode":null,"errorMessage":"Email OAuth2 device-code polling failed ({status}): {text}","messagePattern":"Email OAuth2 device-code polling failed \\((.+?)\\): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/zeroclaw-providers/src/auth/email_oauth2.rs","lineNumber":171,"sourceCode":"        let text = response.text().await.unwrap_or_default();\n\n        if let Ok(err) = serde_json::from_str::<OAuthErrorResponse>(&text) {\n            match err.error.as_str() {\n                \"authorization_pending\" => continue,\n                \"slow_down\" => {\n                    interval_secs = interval_secs.saturating_add(5);\n                    continue;\n                }\n                \"access_denied\" => anyhow::bail!(\"Email OAuth2 authorization was denied\"),\n                \"expired_token\" => anyhow::bail!(\"Email OAuth2 device-code expired\"),\n                _ => anyhow::bail!(\n                    \"Email OAuth2 device-code polling failed ({status}): {}\",\n                    err.error_description.unwrap_or(err.error)\n                ),\n            }\n        }\n\n        anyhow::bail!(\"Email OAuth2 device-code polling failed ({status}): {text}\");\n    }\n}\n\nasync fn parse_token_response(response: reqwest::Response) -> Result<TokenSet> {\n    if !response.status().is_success() {\n        let status = response.status();\n        let body = response.text().await.unwrap_or_default();\n        anyhow::bail!(\"Email OAuth2 token request failed ({status}): {body}\");\n    }\n\n    let token: TokenResponse = response\n        .json()\n        .await\n        .context(\"Failed to parse email OAuth2 token response\")?;\n\n    let expires_at = token.expires_in.and_then(|seconds| {\n        if seconds <= 0 {\n            None","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/zeroclaw-labs/zeroclaw/blob/88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc/crates/zeroclaw-providers/src/auth/email_oauth2.rs#L153-L189","documentation":"Error \"Email OAuth2 device-code polling failed ({status}): {text}\" thrown in zeroclaw-labs/zeroclaw.","triggerScenarios":"Thrown at crates/zeroclaw-providers/src/auth/email_oauth2.rs:171 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the polling response body for the OAuth error code and correct the client configuration."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88bb9c8533fc57ed7a03e36ca7c9ed2bf8336dcc","analyzedAt":"2026-08-23T01:07:41.857Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}