{"record":{"id":"67cfbfc10eabbfeb","repo":"tonhowtf/omniget","slug":"o-servidor-est-limitando-o-acesso-http-tente-de-novo-daqui-a-67cfbf","errorCode":null,"errorMessage":"o servidor está limitando o acesso (HTTP {}). Tente de novo daqui a pouco","messagePattern":"o servidor está limitando o acesso \\(HTTP (.+?)\\)\\. Tente de novo daqui a pouco","errorType":"http","errorClass":null,"httpStatus":429,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/lists/mod.rs","lineNumber":475,"sourceCode":"                tokio::time::sleep(self.delay - since).await;\n            }\n        }\n        *last = Some(Instant::now());\n    }\n\n    /// GET com o corpo em texto. Repete em 429 e em erro de servidor.\n    pub async fn get_text(&self, url: &str) -> Result<String> {\n        const TRIES: u32 = 4;\n        let mut wait = Duration::from_secs(3);\n        for attempt in 1..=TRIES {\n            self.pace().await;\n            self.requests.fetch_add(1, Ordering::Relaxed);\n            let resp = self.client.get(url).send().await;\n            match resp {\n                Ok(r) if r.status().is_success() => return Ok(r.text().await?),\n                Ok(r) if r.status().as_u16() == 429 || r.status().is_server_error() => {\n                    if attempt == TRIES {\n                        return Err(anyhow!(\n                            \"o servidor está limitando o acesso (HTTP {}). Tente de novo daqui a pouco\",\n                            r.status()\n                        ));\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);\n                    tokio::time::sleep(retry.unwrap_or(wait)).await;\n                    wait *= 2;\n                }\n                Ok(r) if r.status().as_u16() == 401 || r.status().as_u16() == 403 => {\n                    return Err(anyhow!(\n                        \"o site respondeu {} — a sessão salva no gerenciador de cookies expirou ou não tem acesso a isso\",\n                        r.status()\n                    ));","sourceCodeStart":457,"sourceCodeEnd":493,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/lists/mod.rs#L457-L493","documentation":"get_text retries HTTP 429 (rate limit) and 5xx responses with exponential backoff up to TRIES attempts. If the final attempt still returns 429 or a server error, it surfaces a message telling the caller the server is throttling access and to retry later.","triggerScenarios":"The remote site (e.g. Letterboxd/Trakt/Goodreads endpoint fetched via get_text) returned HTTP 429 or 5xx on all TRIES attempts despite backoff and Retry-After honoring.","commonSituations":"Scraping or syncing large lists in quick succession; shared IP rate-limited by the provider; provider outage or maintenance window; other processes in the same network hammering the same API.","solutions":["Wait a few minutes and re-run the operation (the message suggests this)","Reduce request frequency; the client already paces calls via pace(), so slow down callers","Check the service status page for an outage (5xx is server-side)","Retry with fewer/smaller batches of lists in a single run"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match run_fetch().await {\n    Err(e) if e.to_string().contains(\"limitando o acesso\") => {\n        tokio::time::sleep(Duration::from_secs(300)).await;\n        run_fetch().await\n    }\n    other => other,\n}","preventionTips":["Space out list sync operations instead of running them back-to-back","Respect the provider's documented rate limits for bulk imports","Monitor for 429s and back off proactively in your own scheduling"],"tags":["http","rate-limit","retry","network"],"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"}