{"record":{"id":"c657680054ec00ee","repo":"tonhowtf/omniget","slug":"nao-foi-possivel-buscar","errorCode":null,"errorMessage":"nao foi possivel buscar {}: {}","messagePattern":"nao foi possivel buscar (.+?): (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/dependencies.rs","lineNumber":90,"sourceCode":"            \"{}: hash nao confere — esperado {}, obtido {}. Download descartado.\",\n            label,\n            expected,\n            actual\n        ))\n    }\n\n    /// Busca o hash esperado num arquivo de sums remoto. `Err` quando a origem\n    /// publica sums mas não conseguimos obtê-los — o chamador deve abortar.\n    pub async fn expected_from_sums_url(\n        client: &reqwest::Client,\n        sums_url: &str,\n        asset: &str,\n    ) -> anyhow::Result<String> {\n        let response = client\n            .get(sums_url)\n            .send()\n            .await\n            .map_err(|e| anyhow!(\"nao foi possivel buscar {}: {}\", sums_url, e))?;\n        if !response.status().is_success() {\n            return Err(anyhow!(\n                \"nao foi possivel buscar {}: HTTP {}\",\n                sums_url,\n                response.status()\n            ));\n        }\n        let text = response\n            .text()\n            .await\n            .map_err(|e| anyhow!(\"corpo ilegivel de {}: {}\", sums_url, e))?;\n        parse_sha256sums(&text, asset)\n            .or_else(|| parse_single_sha256(&text))\n            .ok_or_else(|| anyhow!(\"{} nao esta listado em {}\", asset, sums_url))\n    }\n}\n\npub fn bin_name(tool: &str) -> String {","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/dependencies.rs#L72-L108","documentation":"Thrown by expected_from_sums_url when the HTTP request to fetch a sha256sums file fails at the transport level (reqwest send() error). It wraps the underlying reqwest error with the requested URL for context. This is the network-failure branch of the checksum-manifest fetch, distinct from a non-success HTTP status.","triggerScenarios":"Calling expected_from_sums_url (directly or via download_ffmpeg/update_ffmpeg) when client.get(sums_url).send().await returns Err: DNS failure, connection refused/timeout, TLS error, or no network interface.","commonSituations":"Machine offline or behind a captive portal; corporate proxy blocking the host; DNS misconfiguration; firewall egress rules; sums_url pointing at a host that no longer resolves.","solutions":["Verify network connectivity and DNS resolution for the sums_url host (curl -I <sums_url>).","Check proxy/VPN/firewall settings that may block egress HTTPS.","Retry the download; transient network errors often resolve.","Inspect the wrapped reqwest error in the message for the precise cause (timeout vs DNS vs TLS)."],"exampleFix":"// before\nlet hash = dependencies::expected_from_sums_url(&client, &sums_url, \"ffmpeg\").await?;\n// after\nlet hash = match dependencies::expected_from_sums_url(&client, &sums_url, \"ffmpeg\").await {\n    Ok(h) => h,\n    Err(e) => { log::warn!(\"checksum fetch failed, will rebuild: {e}\"); return Err(e); }\n};","handlingStrategy":"retry","validationCode":"// Rust: preflight reachability check before fetching sums\nasync fn sums_reachable(client: &reqwest::Client, url: &str) -> bool {\n    matches!(client.get(url).send().await, Ok(_))\n}","typeGuard":null,"tryCatchPattern":"match expected_from_sums_url(&client, &sums_url, asset).await {\n    Ok(h) => h,\n    Err(e) => { log::warn!(\"network error fetching sums: {e:#}\"); backoff_retry_or_fail(e) }\n}","preventionTips":["Retry with exponential backoff on transient network errors.","Precheck connectivity/DNS before starting long download flows.","Surface the wrapped reqwest error to logs for diagnosis."],"tags":["network","http","rust","download"],"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"}