{"record":{"id":"8f81b8a0c033cfb6","repo":"tonhowtf/omniget","slug":"notfound","errorCode":"NotFound","errorMessage":"Post not available","messagePattern":"Post not available","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/platforms/bluesky/mod.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/src/platforms/bluesky/mod.rs#L128-L164","documentation":"In `fetch_post` (src-tauri/src/platforms/bluesky/mod.rs:146), the AppView responded successfully but its JSON body contains `error: \"NotFound\"` or `\"InternalServerError\"`, which the code maps to the fixed message \"Post not available\". The post referenced by the URL could not be retrieved as a viewable thread.","triggerScenarios":"The at-uri built from user/post_id points to a deleted post, a post from a deactivated/blocked account, or an invalid rkey the AppView can't resolve and reports as NotFound (or InternalServerError in edge cases).","commonSituations":"Post was deleted after the link was copied; author's account was suspended or deactivated; typos in the post id; private/blocked relationship preventing the viewer from seeing the post.","solutions":["Open the URL in a browser to confirm the post still exists and is publicly visible.","Check whether the author's account is active and not blocking you.","Validate the post id/rkey extracted from the URL for truncation or corruption.","Treat this as terminal for the download and surface a user-friendly 'post unavailable' message."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// resolve post existence before downloading:\n// GET https://public.api.bsky.app/xrpc/app.bsky.feed.getPosts?uris=<at-uri>\n// and check that a matching post entry with a non-'not found' view is returned","typeGuard":null,"tryCatchPattern":"match fetch_post(&user, &post_id).await {\n    Err(e) if e.to_string() == \"Post not available\" => {\n        println!(\"The post was deleted or is not publicly visible.\");\n    }\n    other => other?,\n}","preventionTips":["Verify the post opens in a browser before downloading.","Check the author's account status for suspensions/deactivation.","Don't cache post ids long-term; posts can be deleted."],"tags":["rust","bluesky","not-found","deleted-post"],"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"}