tonhowtf/omniget · error

Post not available

Error message

Post not available

What it means

fetch_detail requires the itemStruct to contain an author object as a final sanity check. A missing author means TikTok returned a structurally-present but effectively empty itemStruct — the post is not actually retrievable (removed, blocked, or made private) even though status checks passed.

Solutions

  1. Confirm the post URL opens and shows the author in a logged-out browser.
  2. Retry with captured cookies and a realistic User-Agent to get a full payload.
  3. Fall back to get_media_info_via_ytdlp for a different extraction pipeline.
  4. Treat as 'post unavailable' in the UI rather than retrying endlessly.
Defensive patterns

Strategy: validation

Validate before calling

// Validate the parsed struct before use
if detail.get("author").is_none() {
    eprintln!("itemStruct has no author — post is unavailable");
}

Type guard

fn has_author(detail: &serde_json::Value) -> bool {
    detail.get("author").is_some()
}

Try / catch

match get_media_info(url).await {
    Err(e) if e.to_string() == "Post not available" => mark_post_unavailable(url),
    other => other,
}

Prevention

When it happens

Trigger: get_media_info called on a post whose parsed itemStruct has no "author" key: recently deleted posts, private accounts, geo-blocked content, or a truncated/anti-bot payload from TikTok.

Common situations: Link to a deleted TikTok still circulating; account set to private after posting; TikTok serving an anonymized placeholder payload to suspicious clients.

Related errors


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

Appendix: source

Thrown at src-tauri/src/platforms/tiktok/mod.rs:206

                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"));
        }

        Ok(detail)
    }

    fn extract_author(detail: &serde_json::Value) -> String {
        detail
            .pointer("/author/uniqueId")
            .or_else(|| detail.pointer("/author/unique_id"))
            .and_then(|v| v.as_str())
            .unwrap_or("unknown")
            .to_string()
    }

    fn extract_video_url(detail: &serde_json::Value) -> Option<String> {
        if let Some(play_addr) = detail.pointer("/video/playAddr") {
            if let Some(url) = play_addr.as_str() {
                if Self::is_valid_play_addr(url) {

View on GitHub (pinned to 8600b91f42)