{"record":{"id":"6bb60aaf0fa02eab","repo":"tonhowtf/omniget","slug":"post-not-available","errorCode":null,"errorMessage":"Post not available","messagePattern":"Post not available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/platforms/bluesky.rs","lineNumber":146,"sourceCode":"    async fn fetch_post(&self, user: &str, post_id: &str) -> anyhow::Result<serde_json::Value> {\n        let uri = format!(\"at://{}/app.bsky.feed.post/{}\", user, post_id);\n        let url = format!(\n            \"{}?depth=0&parentHeight=0&uri={}\",\n            API_BASE,\n            urlencoding::encode(&uri)\n        );\n\n        let response = self.client.get(&url).send().await?;\n\n        if !response.status().is_success() {\n            return Err(anyhow!(\"Bluesky API retornou HTTP {}\", response.status()));\n        }\n\n        let json: serde_json::Value = response.json().await?;\n\n        if let Some(error) = json.get(\"error\").and_then(|e| e.as_str()) {\n            return match error {\n                \"NotFound\" | \"InternalServerError\" => Err(anyhow!(\"Post not available\")),\n                \"InvalidRequest\" => Err(anyhow!(\"Unsupported link\")),\n                _ => Err(anyhow!(\"Erro da API: {}\", error)),\n            };\n        }\n\n        Ok(json)\n    }\n}\n\nenum BlueskyMedia {\n    Video { hls_url: String },\n    Images { urls: Vec<String> },\n    Gif { url: String },\n}\n\nfn extract_media(embed: &serde_json::Value) -> Option<BlueskyMedia> {\n    let embed_type = embed.get(\"$type\")?.as_str()?;\n","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/platforms/bluesky.rs#L128-L164","documentation":"Thrown in fetch_post when the Bluesky API responds with a JSON body containing error \"NotFound\" or \"InternalServerError\". It means the requested post thread could not be retrieved — the post does not exist, was deleted, or the AppView had an internal failure.","triggerScenarios":"The at:// URI built from the URL's handle and post id resolves to nothing (deleted post, typo in post id, renamed handle) or Bluesky's AppView returns NotFound/InternalServerError in the error envelope.","commonSituations":"Users share deleted or retracted posts, accounts that were deactivated, or mistyped/copied-truncated links; Bluesky-side internal errors also land here.","solutions":["Confirm the post still opens in a browser; if not, the post is gone and cannot be downloaded.","Check the handle and post id extracted from the URL are correct (no truncation).","For InternalServerError, retry after a short delay as it may be transient.","Handle this error gracefully in UI as 'post unavailable' rather than a crash."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// check the post is reachable before invoking the downloader\nlet status = reqwest::get(format!(\"https://public.api.bsky.app/xrpc/app.bsky.feed.getPostThread?uri={}\", urlencode(at_uri))).await?.status();\nif status == 404 { return Err(anyhow!(\"post is gone\")); }","typeGuard":null,"tryCatchPattern":"match downloader.get_media_info(url).await {\n    Err(e) if e.to_string() == \"Post not available\" => {\n        ui.show_message(\"This post was deleted or is unavailable\");\n    }\n    other => other.map(|i| download(i)),\n}","preventionTips":["Open the link in a browser first; deleted posts will always fail","Don't cache post IDs long-term — posts get deleted","Treat this as a permanent failure; do not retry"],"tags":["bluesky","api","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}