{"record":{"id":"05422e18366f4658","repo":"tonhowtf/omniget","slug":"post-not-available-mod","errorCode":null,"errorMessage":"Post not available: {}","messagePattern":"Post not available: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/src/platforms/tiktok/mod.rs","lineNumber":183,"sourceCode":"            .split(\"<script id=\\\"__UNIVERSAL_DATA_FOR_REHYDRATION__\\\" type=\\\"application/json\\\">\")\n            .nth(1)\n            .and_then(|s| s.split(\"</script>\").next())\n            .ok_or_else(|| anyhow!(\"TikTok is blocking requests. Try again in a few minutes.\"))?;\n\n        let data: serde_json::Value = serde_json::from_str(json_str)\n            .map_err(|_| anyhow!(\"Erro ao processar resposta do TikTok\"))?;\n\n        let video_detail = data\n            .get(\"__DEFAULT_SCOPE__\")\n            .and_then(|s| s.get(\"webapp.video-detail\"))\n            .ok_or_else(|| anyhow!(\"Video data not found in TikTok response\"))?;\n\n        if let Some(status_msg) = video_detail\n            .get(\"statusMsg\")\n            .and_then(|v| v.as_str())\n            .filter(|s| !s.is_empty())\n        {\n            return Err(anyhow!(\"Post not available: {}\", status_msg));\n        }\n\n        if let Some(status_code) = video_detail.get(\"statusCode\").and_then(|v| v.as_u64()) {\n            if status_code != 0 {\n                return Err(anyhow!(\"Post not available (status {})\", status_code));\n            }\n        }\n\n        let detail = video_detail\n            .pointer(\"/itemInfo/itemStruct\")\n            .ok_or_else(|| anyhow!(\"Video data not found in TikTok response\"))?\n            .clone();\n\n        if detail\n            .get(\"isContentClassified\")\n            .and_then(|v| v.as_bool())\n            .unwrap_or(false)\n        {","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/src/platforms/tiktok/mod.rs#L165-L201","documentation":"TikTok's video-detail payload contains a non-empty statusMsg string; fetch_detail forwards it to the caller wrapped in this error. It is TikTok's own explanation of why the post content is unavailable.","triggerScenarios":"The video-detail JSON parses successfully but statusMsg is set (e.g. 'Video currently unavailable', 'Content removed', region or account restrictions).","commonSituations":"Deleted or private videos, content removed for ToS violations, region-locked posts, or account suspended/deleted.","solutions":["Read TikTok's statusMsg in the error text to determine the exact cause","Inform the user the post itself is unavailable (not a library bug)","Skip/mark the post and continue batch processing","Retest later for temporary messages like 'currently unavailable'"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match get_media_info(url).await {\n    Err(e) if e.to_string().starts_with(\"Post not available:\") => {\n        mark_unavailable(url, e.to_string())\n    }\n    other => other,\n}","preventionTips":["Parse statusMsg from the error text to inform users precisely","Treat these as permanent failures and skip rather than retry","Keep a list of known TikTok statusMsg values for better UX"],"tags":["tiktok","api-error","content-unavailable"],"backgroundTag":"api-error-response","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}