{"record":{"id":"a6fdcd3a953ccd42","repo":"tonhowtf/omniget","slug":"post-indisponivel","errorCode":null,"errorMessage":"post indisponivel","messagePattern":"post indisponivel","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src-tauri/omniget-core/src/core/tools/x/fx.rs","lineNumber":307,"sourceCode":"fn results_page(v: &Value) -> Page<XPost> {\n    let items = v\n        .get(\"results\")\n        .and_then(|a| a.as_array())\n        .into_iter()\n        .flatten()\n        .filter_map(post_from)\n        .collect();\n    Page {\n        items,\n        cursor: bottom_cursor(v),\n    }\n}\n\npub async fn status(id: &str) -> anyhow::Result<XPost> {\n    let v = get(&format!(\"status/{}\", id), &[]).await?;\n    v.get(\"status\")\n        .and_then(post_from)\n        .ok_or_else(|| anyhow!(\"post indisponivel\"))\n}\n\n/// Thread do autor (o proprio FxTwitter monta a sequencia). Devolve o post\n/// focal e a lista completa (vazia quando nao e thread).\npub async fn thread(id: &str) -> anyhow::Result<(XPost, Vec<XPost>, bool)> {\n    let v = get(&format!(\"thread/{}\", id), &[]).await?;\n    let focal = v\n        .get(\"status\")\n        .and_then(post_from)\n        .ok_or_else(|| anyhow!(\"post indisponivel\"))?;\n    let (posts, truncated) = match v.get(\"thread\") {\n        Some(t) if t.is_object() => (\n            t.get(\"statuses\")\n                .and_then(|a| a.as_array())\n                .into_iter()\n                .flatten()\n                .filter_map(post_from)\n                .collect(),","sourceCodeStart":289,"sourceCodeEnd":325,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/x/fx.rs#L289-L325","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Retry once — transient cache misses at FxTwitter often resolve immediately.","Fall back to the native XClient status fetch for this ID.","Verify the post exists and is a standard tweet (not deleted/protected).","Inspect the raw FxTwitter response to see which fields post_from requires are missing and extend the parser if it's a schema gap."],"exampleFix":"// before\nlet v = get(&format!(\"status/{}\", id), &[]).await?;\nv.get(\"status\").and_then(post_from).ok_or_else(|| anyhow!(\"post indisponivel\"))\n// after\nlet v = get(&format!(\"status/{}\", id), &[]).await?;\nmatch v.get(\"status\").and_then(post_from) {\n    Some(p) => Ok(p),\n    None => xclient::status(id).await, // fallback\n}","handlingStrategy":"fallback","validationCode":null,"typeGuard":"fn has_post(v: &Value) -> bool {\n    v.get(\"status\").map_or(false, |s| s.get(\"id\").is_some())\n}","tryCatchPattern":"match fx::status(&id).await {\n    Ok(p) => p,\n    Err(e) if e.to_string().contains(\"post indisponivel\") => {\n        xclient::status(&id).await.map_err(|_| anyhow!(\"post {id} indisponivel em ambas as fontes\"))?\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Retry once on this error — FxTwitter cache misses are often transient","Keep the native X client wired as an automatic fallback","Confirm posts still exist before ingestion to avoid deleted-content misses","Extend post_from when FxTwitter adds new post types (articles, etc.)"],"tags":["fxtwitter","missing-field","x","parse"],"backgroundTag":"unexpected-response-shape","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"}