tonhowtf/omniget · error · anyhow

a conta do Trakt bateu no limite do plano gratuito (HTTP…

Error message

a conta do Trakt bateu no limite do plano gratuito (HTTP 420)

What it means

get_page in the Trakt lists tool maps special HTTP statuses from the Trakt API to friendly Portuguese errors. HTTP 420 (a Trakt-specific status) means the account has exceeded the request/collection limits of Trakt's free plan, so the tool aborts instead of retrying. It is thrown before the generic success/error handling in get_page.

Solutions

  1. Upgrade the Trakt account to VIP (trakt.tv/vip), which lifts the limit
  2. Reduce the amount of data requested (lower opts.max_pages, or export fewer/narrower lists)
  3. Wait if the limit is request-based and retry later
  4. Check trakt.tv account settings for list/collection limits and prune oversized custom lists
Defensive patterns

Strategy: try-catch

Try / catch

match trakt_lists::run(&opts, &progress) {
    Err(e) if e.to_string().contains("HTTP 420") => {
        // surface "upgrade to Trakt VIP or reduce export size" to the user
    }
    other => other?,
}

Prevention

When it happens

Trigger: Calling get_page (via get_all during run/export) when the Trakt API answers status 420 for a list endpoint — i.e. the authenticated account hit the free-tier limit (too many list items, requests, or a VIP-only resource on a free account).

Common situations: Exporting large user lists with a free Trakt account; syncing a big watchlist that exceeds free-plan collection limits; a user previously on VIP whose subscription lapsed.

Understand the failure class

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/0aad471bcd35044b. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/lists/trakt.rs:488

                .header("trakt-api-version", "2")
                .header("trakt-api-key", &self.client_id)
                .header(
                    reqwest::header::AUTHORIZATION,
                    format!("Bearer {}", self.token),
                )
                .send()
                .await?;
            let status = r.status();
            if status.as_u16() == 401 {
                return Err(anyhow!(
                    "o Trakt recusou o token (401). Reconecte a conta no botão acima"
                ));
            }
            if status.as_u16() == 426 {
                return Err(anyhow!("esse recurso é só para contas VIP do Trakt"));
            }
            if status.as_u16() == 420 {
                return Err(anyhow!(
                    "a conta do Trakt bateu no limite do plano gratuito (HTTP 420)"
                ));
            }
            if status.as_u16() == 423 {
                return Err(anyhow!(
                    "a conta do Trakt está bloqueada; fale com o suporte deles"
                ));
            }
            if status.as_u16() == 429 || status.is_server_error() {
                if attempt == 4 {
                    return Err(anyhow!("o Trakt está limitando o acesso (HTTP {})", status));
                }
                let retry = r
                    .headers()
                    .get(reqwest::header::RETRY_AFTER)
                    .and_then(|v| v.to_str().ok())
                    .and_then(|v| v.trim().parse::<u64>().ok())
                    .map(Duration::from_secs);

View on GitHub (pinned to 8600b91f42)