tonhowtf/omniget · error

Post not available (status )

Error message

Post not available (status {})

What it means

TikTok returned a numeric statusCode in the video-detail payload that is not 0 (0 = OK). The library maps any non-zero code to 'Post not available (status N)', exposing TikTok's numeric error code to the caller.

Solutions

  1. Look up the numeric status in TikTok's web API error code list to identify the cause.
  2. If the code indicates removal/privacy, treat the post as unavailable and inform the user.
  3. If it indicates throttling/verification, back off and retry later or with new session cookies.
  4. Try the yt-dlp fallback path which uses TikTok's extraction independent of this status code.
Defensive patterns

Strategy: try-catch

Try / catch

match tiktok.get_media_info(url).await {
    Err(e) if e.to_string().starts_with("Post not available (status ") => {
        let code: Option<u64> = /* parse digits between parens */ None;
        // branch on code: privacy vs rate-limit
    }
    other => { other?; }
}

Prevention

When it happens

Trigger: fetch_detail finds video_detail.statusCode as a u64 != 0 (and no statusMsg was present), and returns the formatted error with the raw code.

Common situations: status 10216/10221-style codes for private or removed videos; content status codes for geo-restriction; rate-limit or verification codes after too many scraping requests.

Related errors


AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12). Data as JSON: /api/errors/86188bb49acdf23f. Report an issue: GitHub.

Appendix: source

Thrown at src-tauri/omniget-core/src/platforms/tiktok.rs:188

        let data: serde_json::Value = serde_json::from_str(json_str)
            .map_err(|_| anyhow!("Erro ao processar resposta do TikTok"))?;

        let video_detail = data
            .get("__DEFAULT_SCOPE__")
            .and_then(|s| s.get("webapp.video-detail"))
            .ok_or_else(|| anyhow!("Video data not found in TikTok response"))?;

        if let Some(status_msg) = video_detail
            .get("statusMsg")
            .and_then(|v| v.as_str())
            .filter(|s| !s.is_empty())
        {
            return Err(anyhow!("Post not available: {}", status_msg));
        }

        if let Some(status_code) = video_detail.get("statusCode").and_then(|v| v.as_u64()) {
            if status_code != 0 {
                return Err(anyhow!("Post not available (status {})", status_code));
            }
        }

        let detail = video_detail
            .pointer("/itemInfo/itemStruct")
            .ok_or_else(|| anyhow!("Video data not found in TikTok response"))?
            .clone();

        if detail
            .get("isContentClassified")
            .and_then(|v| v.as_bool())
            .unwrap_or(false)
        {
            return Err(anyhow!("Age-restricted content"));
        }

        if detail.get("author").is_none() {
            return Err(anyhow!("Post not available"));

View on GitHub (pinned to 8600b91f42)