zeroclaw-labs/zeroclaw · error

Google OAuth refresh error: {} - {}

Error message

Google OAuth refresh error: {} - {}

What it means

Error "Google OAuth refresh error: {} - {}" thrown in zeroclaw-labs/zeroclaw.

Source

Thrown at crates/zeroclaw-providers/src/auth/gemini_oauth.rs:180

        ("client_secret", client_secret),
    ];

    let response = client
        .post(GOOGLE_OAUTH_TOKEN_URL)
        .form(&form)
        .send()
        .await
        .context("Failed to send refresh token request")?;

    let status = response.status();
    let body = response
        .text()
        .await
        .context("Failed to read refresh response body")?;

    if !status.is_success() {
        if let Ok(err) = serde_json::from_str::<OAuthErrorResponse>(&body) {
            anyhow::bail!(
                "Google OAuth refresh error: {} - {}",
                err.error,
                err.error_description.unwrap_or_default()
            );
        }
        anyhow::bail!("Google OAuth refresh failed ({}): {}", status, body);
    }

    let token_response: TokenResponse =
        serde_json::from_str(&body).context("Failed to parse refresh response")?;

    let expires_at = token_response
        .expires_in
        .map(|secs| Utc::now() + chrono::Duration::seconds(secs));

    Ok(TokenSet {
        access_token: token_response.access_token,
        refresh_token: token_response.refresh_token,

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Read the refresh error code; re-authenticate if the refresh token was revoked.

When it happens

Trigger: Thrown at crates/zeroclaw-providers/src/auth/gemini_oauth.rs:180 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/00cd8d6f34f5ea49. Report an issue: GitHub.