{"record":{"id":"919a87a2394a360c","repo":"tonhowtf/omniget","slug":"o-site-respondeu-a-sess-o-salva-no-gerenciador-de-cookies","errorCode":null,"errorMessage":"o site respondeu {} — a sessão salva no gerenciador de cookies expirou ou não tem acesso a isso","messagePattern":"o site respondeu (.+?) — a sessão salva no gerenciador de cookies expirou ou não tem acesso a isso","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/lists/mod.rs","lineNumber":490,"sourceCode":"                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                    ));\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    }","sourceCodeStart":472,"sourceCodeEnd":508,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/lists/mod.rs#L472-L508","documentation":"get_text maps HTTP 401/403 responses to this error: the saved browser-cookie session (imported from the cookie manager) is expired or the authenticated account does not have access to the requested resource. The client performs authenticated fetches using cookies from the user's browser session.","triggerScenarios":"A request requiring authentication returned 401 or 403 — typically a private/restricted list or account-scoped endpoint fetched with stale cookies.","commonSituations":"User logged out of the site in their browser, invalidating the imported session; session cookie aged out; the list is private or belongs to another account; site changed session/auth mechanics.","solutions":["Log in to the site again in the browser and re-import/refresh the cookie session in the cookie manager","Verify the account has access to the requested list/resource (private vs public)","Confirm the correct site's cookies are configured (not a different domain)","Retry after re-authenticating; if the list is private, make it public or use an export file instead"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"let cookies_valid = cookie_manager::has_session_cookie(\"letterboxd.com\"); // check before authenticated fetches\nif !cookies_valid { prompt_reauth(); }","typeGuard":null,"tryCatchPattern":"match client.get_text(&url).await {\n    Err(e) if e.to_string().contains(\"401\") || e.to_string().contains(\"403\") => {\n        prompt_user_to_relogin();\n    }\n    other => other?,\n}","preventionTips":["Refresh imported cookies whenever you re-login to the site in the browser","Keep sessions alive by using the app periodically, or re-import after long idle periods","Verify the list is publicly accessible or that the account has permission before fetching"],"tags":["http","auth","cookies","session-expired"],"backgroundTag":"jwt-token-expired","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"}