{"record":{"id":"837aa28d86f948c7","repo":"tonhowtf/omniget","slug":"n-o-consegui-buscar","errorCode":null,"errorMessage":"não consegui buscar {}","messagePattern":"não consegui buscar (.+?)","errorType":"exception","errorClass":"anyhow","httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/lists/mod.rs","lineNumber":507,"sourceCode":"                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                    ));\n                }\n                Ok(r) if r.status().as_u16() == 404 => {\n                    return Err(anyhow!(\"não encontrado ({})\", url));\n                }\n                Ok(r) => return Err(anyhow!(\"HTTP {} em {}\", r.status(), url)),\n                Err(e) if attempt < TRIES => {\n                    tokio::time::sleep(wait).await;\n                    wait *= 2;\n                    tracing::debug!(\"lists: tentativa {} falhou: {}\", attempt, e);\n                }\n                Err(e) => return Err(e.into()),\n            }\n        }\n        Err(anyhow!(\"não consegui buscar {}\", url))\n    }\n\n    /// HEAD só para saber se um arquivo já existe. É como o Goodreads avisa\n    /// que terminou de gerar o CSV: enquanto não está pronto, responde 404.\n    pub async fn head_status(&self, url: &str) -> Result<u16> {\n        self.pace().await;\n        self.requests.fetch_add(1, Ordering::Relaxed);\n        Ok(self.client.head(url).send().await?.status().as_u16())\n    }\n\n    /// GET que devolve os bytes crus (o ZIP do Letterboxd, o CSV do Goodreads).\n    pub async fn get_bytes(&self, url: &str) -> Result<(Vec<u8>, String)> {\n        self.pace().await;\n        self.requests.fetch_add(1, Ordering::Relaxed);\n        let r = self.client.get(url).send().await?;\n        if !r.status().is_success() {\n            return Err(anyhow!(\"HTTP {} em {}\", r.status(), url));\n        }","sourceCodeStart":489,"sourceCodeEnd":525,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/lists/mod.rs#L489-L525","documentation":"Final fallback of get_text: the loop exhausts TRIES attempts because each attempt ended in a transport-level Err (the last error is propagated via `Err(e) => return Err(e.into())`; this message only fires if the loop somehow exits without returning, or as the loop's definitive failure when no specific branch matched). It means the URL could not be fetched at all after all retries.","triggerScenarios":"Repeated network-layer failures via reqwest: DNS resolution failure, connection refused/reset, TLS errors, or timeouts on every one of the TRIES attempts.","commonSituations":"No internet connection or offline machine; DNS misconfiguration; firewall blocking the domain; site temporarily down at the TCP/TLS level; system clock issues breaking TLS.","solutions":["Check basic internet connectivity (can you open the URL in a browser?)","Verify DNS resolution for the target host (dig/nslookup)","Check firewall/proxy settings that may block the app's outbound requests","Retry later if the site is down; inspect tracing debug logs ('lists: tentativa N falhou') for the underlying error"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match client.get_text(&url).await {\n    Err(e) if e.to_string().contains(\"não consegui buscar\") => {\n        eprintln!(\"sem conexão com {} — verifique sua internet\", url);\n        schedule_retry();\n    }\n    other => other?,\n}","preventionTips":["Check connectivity before starting long sync jobs","Prefer export-file workflows when the network is unreliable","Enable tracing at debug level to capture the underlying transport errors"],"tags":["network","http","connectivity","retry"],"backgroundTag":"network-request-failed","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"}