tonhowtf/omniget · warning

post indisponivel

Error message

post indisponivel

What it means

status() fetched the tweet successfully from FxTwitter but the JSON contained no usable "status" object convertible by post_from, so it reports the post as unavailable. Unlike 832/833, the API answered 200-style data yet without the expected post payload.

Solutions

  1. Retry once — transient cache misses at FxTwitter often resolve immediately.
  2. Fall back to the native XClient status fetch for this ID.
  3. Verify the post exists and is a standard tweet (not deleted/protected).
  4. Inspect the raw FxTwitter response to see which fields post_from requires are missing and extend the parser if it's a schema gap.

Example fix

// before
let v = get(&format!("status/{}", id), &[]).await?;
v.get("status").and_then(post_from).ok_or_else(|| anyhow!("post indisponivel"))
// after
let v = get(&format!("status/{}", id), &[]).await?;
match v.get("status").and_then(post_from) {
    Some(p) => Ok(p),
    None => xclient::status(id).await, // fallback
}
Defensive patterns

Strategy: fallback

Type guard

fn has_post(v: &Value) -> bool {
    v.get("status").map_or(false, |s| s.get("id").is_some())
}

Try / catch

match fx::status(&id).await {
    Ok(p) => p,
    Err(e) if e.to_string().contains("post indisponivel") => {
        xclient::status(&id).await.map_err(|_| anyhow!("post {id} indisponivel em ambas as fontes"))?
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: FxTwitter returns an envelope whose status field is null/missing — e.g. deleted-but-cached entries, media-only or article posts that FxTwitter cannot map, or partial upstream data for a valid-looking ID.

Common situations: Very new posts not yet cached by FxTwitter; deleted posts between availability check and fetch; non-standard posts (articles, polls with missing fields) that break post_from's expectations.

Related errors


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

Appendix: source

Thrown at src-tauri/omniget-core/src/core/tools/x/fx.rs:307

fn results_page(v: &Value) -> Page<XPost> {
    let items = v
        .get("results")
        .and_then(|a| a.as_array())
        .into_iter()
        .flatten()
        .filter_map(post_from)
        .collect();
    Page {
        items,
        cursor: bottom_cursor(v),
    }
}

pub async fn status(id: &str) -> anyhow::Result<XPost> {
    let v = get(&format!("status/{}", id), &[]).await?;
    v.get("status")
        .and_then(post_from)
        .ok_or_else(|| anyhow!("post indisponivel"))
}

/// Thread do autor (o proprio FxTwitter monta a sequencia). Devolve o post
/// focal e a lista completa (vazia quando nao e thread).
pub async fn thread(id: &str) -> anyhow::Result<(XPost, Vec<XPost>, bool)> {
    let v = get(&format!("thread/{}", id), &[]).await?;
    let focal = v
        .get("status")
        .and_then(post_from)
        .ok_or_else(|| anyhow!("post indisponivel"))?;
    let (posts, truncated) = match v.get("thread") {
        Some(t) if t.is_object() => (
            t.get("statuses")
                .and_then(|a| a.as_array())
                .into_iter()
                .flatten()
                .filter_map(post_from)
                .collect(),

View on GitHub (pinned to 8600b91f42)