tonhowtf/omniget · error

Post not available (status )

Error message

Post not available (status {})

What it means

When the video-detail payload's statusCode field is present and non-zero, fetch_detail reports the post as unavailable with the numeric code. Zero means success; any other value is TikTok signaling a failure condition for the item.

Solutions

  1. Map known TikTok statusCodes to user-friendly messages
  2. Check statusMsg first — it often explains the statusCode
  3. Inform the user the specific post cannot be fetched and why (if code is known)
  4. Update the status-code mapping if TikTok introduces new codes

Example fix

// before
if status_code != 0 {
    return Err(anyhow!("Post not available (status {})", status_code));
}
// after
if status_code != 0 {
    return Err(anyhow!("Post not available (status {}: {})", status_code, describe_tiktok_status(status_code)));
}
Defensive patterns

Strategy: try-catch

Try / catch

match get_media_info(url).await {
    Err(e) if e.to_string().contains("Post not available (status") => {
        let code = extract_status_code(&e);
        handle_known_status(code)
    }
    other => other,
}

Prevention

When it happens

Trigger: The webapp.video-detail JSON contains statusCode != 0 (e.g. 10216 private video, 10202/10204 deleted or blocked content) even though the page and JSON parsed fine.

Common situations: Private/friends-only videos, deleted posts, age- or region-restricted content, or TikTok API-level rejections surfaced inside an otherwise normal page.

Related errors


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

Appendix: source

Thrown at src-tauri/src/platforms/tiktok/mod.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)