{"record":{"id":"459fd7fd389e90f3","repo":"tonhowtf/omniget","slug":"n-o-foi-poss-vel-ler-mod","errorCode":null,"errorMessage":"não foi possível ler {}","messagePattern":"não foi possível ler (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/reddit/mod.rs","lineNumber":469,"sourceCode":"                    ));\n                }\n                Ok(r) if r.status().as_u16() == 404 => {\n                    return Err(anyhow!(\n                        \"post não encontrado (apagado, privado ou id errado)\"\n                    ));\n                }\n                Ok(r) => {\n                    return Err(anyhow!(\"HTTP {} em {}\", r.status(), url));\n                }\n                Err(e) if attempt < TRIES => {\n                    tokio::time::sleep(wait).await;\n                    wait *= 2;\n                    let _ = e;\n                }\n                Err(e) => return Err(e.into()),\n            }\n        }\n        Err(anyhow!(\"não foi possível ler {}\", url))\n    }\n\n    /// Segue os redirecionamentos de um link curto e devolve a URL final.\n    pub async fn resolve(&self, url: &str) -> Result<String> {\n        self.pace().await;\n        self.requests.fetch_add(1, Ordering::Relaxed);\n        let r = self.client.get(url).send().await?;\n        Ok(r.url().to_string())\n    }\n}\n\n/// Data legível a partir do `created_utc` do Reddit.\npub fn fmt_utc(ts: f64) -> String {\n    chrono::DateTime::from_timestamp(ts as i64, 0)\n        .map(|d| d.format(\"%Y-%m-%d %H:%M UTC\").to_string())\n        .unwrap_or_default()\n}\n","sourceCodeStart":451,"sourceCodeEnd":487,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/reddit/mod.rs#L451-L487","documentation":"Sentinel error returned after `get_json` exhausts all TRIES attempts: every attempt ended in a transport-level error (connection reset, DNS failure, timeout) rather than an HTTP status response. The message simply reports that the URL could not be fetched at all.","triggerScenarios":"All retry attempts in get_json return Err from the underlying HTTP client (e.g. reqwest) — connection refused/reset, DNS resolution failure, TLS errors, or request timeouts — so the loop falls through to the final `Err(anyhow!(\"não foi possível ler {}\", url))` at src-tauri/omniget-core/src/core/tools/reddit/mod.rs:469.","commonSituations":"No network access or offline machine, DNS misconfiguration, firewall/proxy blocking reddit.com, TLS certificate problems, or Reddit dropping connections from abusive clients.","solutions":["Verify network connectivity and DNS resolution for the target host (curl the URL manually)","Check proxy/firewall/TLS settings that might block outbound HTTPS to reddit.com","Increase TRIES or the initial backoff if on a flaky connection","Log the underlying request error (currently discarded with `let _ = e`) to see the real cause"],"exampleFix":"// before\nErr(e) if attempt < TRIES => { tokio::time::sleep(wait).await; wait *= 2; let _ = e; }\n// after\nErr(e) if attempt < TRIES => { tokio::time::sleep(wait).await; wait *= 2; tracing::warn!(\"tentativa {}: {}\", attempt, e); }","handlingStrategy":"retry","validationCode":"// check connectivity before the call\nif std::net::TcpStream::connect(\"reddit.com:443\").is_err() {\n    anyhow::bail!(\"sem conexão de rede\");\n}","typeGuard":null,"tryCatchPattern":"match fetcher.get_json(&url).await {\n    Ok(v) => v,\n    Err(e) if e.to_string().starts_with(\"não foi possível ler\") => {\n        // transport failed on every attempt; retry later or fail gracefully\n        eprintln!(\"rede indisponível: {}\", e);\n        return Err(e);\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Verify network/DNS/TLS connectivity to reddit.com before batch runs","Increase TRIES and initial backoff for flaky networks","Fix the code that discards the underlying error (`let _ = e`) so the real cause is logged","Run behind a reliable egress (no silent proxy/firewall drops)"],"tags":["network","http","reddit","transport-error"],"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"}