tonhowtf/omniget · error · anyhow

não consegui buscar {}

Error message

não consegui buscar {}

What it means

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.

Solutions

  1. Check basic internet connectivity (can you open the URL in a browser?)
  2. Verify DNS resolution for the target host (dig/nslookup)
  3. Check firewall/proxy settings that may block the app's outbound requests
  4. Retry later if the site is down; inspect tracing debug logs ('lists: tentativa N falhou') for the underlying error
Defensive patterns

Strategy: retry

Try / catch

match client.get_text(&url).await {
    Err(e) if e.to_string().contains("não consegui buscar") => {
        eprintln!("sem conexão com {} — verifique sua internet", url);
        schedule_retry();
    }
    other => other?,
}

Prevention

When it happens

Trigger: Repeated network-layer failures via reqwest: DNS resolution failure, connection refused/reset, TLS errors, or timeouts on every one of the TRIES attempts.

Common situations: 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.

Related errors


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

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/lists/mod.rs:507

                Ok(r) if r.status().as_u16() == 401 || r.status().as_u16() == 403 => {
                    return Err(anyhow!(
                        "o site respondeu {} — a sessão salva no gerenciador de cookies expirou ou não tem acesso a isso",
                        r.status()
                    ));
                }
                Ok(r) if r.status().as_u16() == 404 => {
                    return Err(anyhow!("não encontrado ({})", url));
                }
                Ok(r) => return Err(anyhow!("HTTP {} em {}", r.status(), url)),
                Err(e) if attempt < TRIES => {
                    tokio::time::sleep(wait).await;
                    wait *= 2;
                    tracing::debug!("lists: tentativa {} falhou: {}", attempt, e);
                }
                Err(e) => return Err(e.into()),
            }
        }
        Err(anyhow!("não consegui buscar {}", url))
    }

    /// HEAD só para saber se um arquivo já existe. É como o Goodreads avisa
    /// que terminou de gerar o CSV: enquanto não está pronto, responde 404.
    pub async fn head_status(&self, url: &str) -> Result<u16> {
        self.pace().await;
        self.requests.fetch_add(1, Ordering::Relaxed);
        Ok(self.client.head(url).send().await?.status().as_u16())
    }

    /// GET que devolve os bytes crus (o ZIP do Letterboxd, o CSV do Goodreads).
    pub async fn get_bytes(&self, url: &str) -> Result<(Vec<u8>, String)> {
        self.pace().await;
        self.requests.fetch_add(1, Ordering::Relaxed);
        let r = self.client.get(url).send().await?;
        if !r.status().is_success() {
            return Err(anyhow!("HTTP {} em {}", r.status(), url));
        }

View on GitHub (pinned to 8600b91f42)