{"record":{"id":"d61cd9ff155569af","repo":"tonhowtf/omniget","slug":"server-returned-error-429-too-many-requests-try-again-later","errorCode":null,"errorMessage":"Server returned error 429 (too many requests). Try again later.","messagePattern":"Server returned error 429 \\(too many requests\\)\\. Try again later\\.","errorType":"exception","errorClass":null,"httpStatus":429,"severity":"warning","filePath":"src-tauri/omniget-core/src/core/ytdlp.rs","lineNumber":4429,"sourceCode":"    ];\n    PATTERNS.iter().any(|p| stderr_lower.contains(p))\n}\n\nfn translate_ytdlp_error(stderr: &str) -> anyhow::Error {\n    let lower = stderr.to_lowercase();\n\n    if lower.contains(\"errno 22\")\n        && (lower.contains(\"textiowrapper\")\n            || lower.contains(\"encoding=\")\n            || lower.contains(\"exception ignored\"))\n    {\n        return anyhow!(\n            \"Console encoding error (non-UTF-8 locale). Update yt-dlp in Settings → Dependencies, or run `chcp 65001` in a terminal and reopen the app.\"\n        );\n    }\n\n    if lower.contains(\"http error 429\") {\n        return anyhow!(\"Server returned error 429 (too many requests). Try again later.\");\n    }\n    if lower.contains(\"http error 403\") || lower.contains(\"forbidden\") {\n        return anyhow!(\"Access denied (403). The video may be private or region-restricted.\");\n    }\n    if lower.contains(\"sign in to confirm\")\n        || lower.contains(\"login required\")\n        || stderr.contains(\"请先登录\")\n        || stderr.contains(\"需要登录\")\n        || stderr.contains(\"登录后可\")\n        || stderr.contains(\"仅登录用户\")\n        || lower.contains(\"this video is only available\") && lower.contains(\"members\")\n    {\n        return anyhow!(\n            \"This video requires login. Import cookies for this site in Settings → Cookies, then retry.\"\n        );\n    }\n    if lower.contains(\"invalid data found when processing input\") {\n        return anyhow!(","sourceCodeStart":4411,"sourceCodeEnd":4447,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/ytdlp.rs#L4411-L4447","documentation":"Friendly remapping (ytdlp.rs:4429) for yt-dlp stderr containing 'HTTP Error 429': the remote video host rate-limited the extractor's requests. The download cannot proceed until the limit window passes; the library translates the raw yt-dlp output into this user-facing message.","triggerScenarios":"yt-dlp output matched by `lower.contains(\"http error 429\")` — downloading many videos rapidly, sharing an IP with heavy users (VPN/proxy/datacenter), or a site with aggressive per-IP throttling (e.g. YouTube 'Please sign in' rate limiting, Instagram, Twitter).","commonSituations":"Batch/queue downloads from one IP; residential IP flagged; cookies absent so guest quotas apply; commercial VPN exit nodes heavily throttled by video platforms.","solutions":["Wait and retry later (minutes to hours depending on the site's limit window).","Slow down: reduce concurrent downloads and batch size in the app queue.","Use cookies/browser authentication for the site so authenticated quotas apply.","Switch network/VPN exit node if the current IP is throttled."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"429\") => {\n        tokio::time::sleep(Duration::from_secs(300)).await;\n        retry_download().await; // with capped exponential backoff\n    }\n    other => other,\n}","preventionTips":["Throttle batch downloads (limit concurrency and add delays between items).","Authenticate with site cookies so per-user quotas apply instead of strict per-IP guest limits.","Avoid datacenter/VPN IPs known to be throttled by video platforms.","Implement capped exponential backoff around download attempts."],"tags":["network","rate-limit","ytdlp","http-429"],"backgroundTag":"rate-limit-exceeded","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"}