Kuberwastaken/claurst · error · anyhow::Error

poll_bridge_messages: rate-limited (HTTP 429) after

Error message

poll_bridge_messages: rate-limited (HTTP 429) after {} retries

What it means

Bails after the poll loop has retried a rate-limited (HTTP 429) bridge message poll more times than max_retries allows. Each retry used exponential backoff (1s * 2^(attempt-1)); the server kept returning 429 until the retry budget was exhausted, so polling gives up rather than continue hammering the endpoint.

Solutions

  1. Wait for the rate-limit window to reset before restarting the bridge loop
  2. Reduce poll frequency or number of concurrent bridge sessions to stay under the limit
  3. If persistent, verify the account's rate-limit tier with the bridge service
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src-rust/crates/bridge/src/lib.rs:1097 when the library encounters an invalid state.

Common situations: See trigger scenarios.

Understand the failure class


AI-assisted analysis of Kuberwastaken/claurst@b0637c97ec (2026-09-10). Data as JSON: /api/errors/aaa0639571dd840e. Report an issue: GitHub.

Appendix: source

Thrown at src-rust/crates/bridge/src/lib.rs:1097

            .await
            .context("poll_bridge_messages: HTTP GET failed")?;

        let status = resp.status().as_u16();
        match status {
            200 => {
                let text = resp.text().await.context("poll_bridge_messages: reading body")?;
                if text.trim().is_empty() || text.trim() == "[]" {
                    return Ok(vec![]);
                }
                let msgs: Vec<SimpleMessage> =
                    serde_json::from_str(&text).context("poll_bridge_messages: JSON parse")?;
                return Ok(msgs);
            }
            204 => return Ok(vec![]),
            429 => {
                attempt += 1;
                if attempt > max_retries {
                    anyhow::bail!("poll_bridge_messages: rate-limited (HTTP 429) after {} retries", max_retries);
                }
                let backoff = std::time::Duration::from_millis(1_000 * 2u64.pow(attempt - 1));
                warn!(attempt, "Bridge poll rate-limited; backing off {:?}", backoff);
                tokio::time::sleep(backoff).await;
                continue;
            }
            401 | 403 => {
                anyhow::bail!("poll_bridge_messages: auth error (HTTP {})", status);
            }
            _ => {
                anyhow::bail!("poll_bridge_messages: server returned HTTP {}", status);
            }
        }
    }
}

/// Post a response to a specific incoming message on an active bridge session.
///

View on GitHub (pinned to b0637c97ec)