{"record":{"id":"0aad471bcd35044b","repo":"tonhowtf/omniget","slug":"a-conta-do-trakt-bateu-no-limite-do-plano-gratuito-http-420","errorCode":null,"errorMessage":"a conta do Trakt bateu no limite do plano gratuito (HTTP 420)","messagePattern":"a conta do Trakt bateu no limite do plano gratuito \\(HTTP 420\\)","errorType":"exception","errorClass":"anyhow","httpStatus":420,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/lists/trakt.rs","lineNumber":488,"sourceCode":"                .header(\"trakt-api-version\", \"2\")\n                .header(\"trakt-api-key\", &self.client_id)\n                .header(\n                    reqwest::header::AUTHORIZATION,\n                    format!(\"Bearer {}\", self.token),\n                )\n                .send()\n                .await?;\n            let status = r.status();\n            if status.as_u16() == 401 {\n                return Err(anyhow!(\n                    \"o Trakt recusou o token (401). Reconecte a conta no botão acima\"\n                ));\n            }\n            if status.as_u16() == 426 {\n                return Err(anyhow!(\"esse recurso é só para contas VIP do Trakt\"));\n            }\n            if status.as_u16() == 420 {\n                return Err(anyhow!(\n                    \"a conta do Trakt bateu no limite do plano gratuito (HTTP 420)\"\n                ));\n            }\n            if status.as_u16() == 423 {\n                return Err(anyhow!(\n                    \"a conta do Trakt está bloqueada; fale com o suporte deles\"\n                ));\n            }\n            if status.as_u16() == 429 || status.is_server_error() {\n                if attempt == 4 {\n                    return Err(anyhow!(\"o Trakt está limitando o acesso (HTTP {})\", status));\n                }\n                let retry = r\n                    .headers()\n                    .get(reqwest::header::RETRY_AFTER)\n                    .and_then(|v| v.to_str().ok())\n                    .and_then(|v| v.trim().parse::<u64>().ok())\n                    .map(Duration::from_secs);","sourceCodeStart":470,"sourceCodeEnd":506,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/lists/trakt.rs#L470-L506","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","solutions":["Upgrade the Trakt account to VIP (trakt.tv/vip), which lifts the limit","Reduce the amount of data requested (lower opts.max_pages, or export fewer/narrower lists)","Wait if the limit is request-based and retry later","Check trakt.tv account settings for list/collection limits and prune oversized custom lists"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match trakt_lists::run(&opts, &progress) {\n    Err(e) if e.to_string().contains(\"HTTP 420\") => {\n        // surface \"upgrade to Trakt VIP or reduce export size\" to the user\n    }\n    other => other?,\n}","preventionTips":["Use a Trakt VIP account for large exports","Cap opts.max_pages and the number of lists per run","Space exports out rather than running them in a tight loop"],"tags":["trakt","http-420","rate-limit","free-plan-limit"],"backgroundTag":"rate-limit-exceeded","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}