tonhowtf/omniget · error

Post not available

Error message

Post not available

What it means

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.

Solutions

  1. Confirm the post still opens in a browser; if not, the post is gone and cannot be downloaded.
  2. Check the handle and post id extracted from the URL are correct (no truncation).
  3. For InternalServerError, retry after a short delay as it may be transient.
  4. Handle this error gracefully in UI as 'post unavailable' rather than a crash.
Defensive patterns

Strategy: try-catch

Validate before calling

// check the post is reachable before invoking the downloader
let status = reqwest::get(format!("https://public.api.bsky.app/xrpc/app.bsky.feed.getPostThread?uri={}", urlencode(at_uri))).await?.status();
if status == 404 { return Err(anyhow!("post is gone")); }

Try / catch

match downloader.get_media_info(url).await {
    Err(e) if e.to_string() == "Post not available" => {
        ui.show_message("This post was deleted or is unavailable");
    }
    other => other.map(|i| download(i)),
}

Prevention

When it happens

Trigger: 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.

Common situations: Users share deleted or retracted posts, accounts that were deactivated, or mistyped/copied-truncated links; Bluesky-side internal errors also land here.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at src-tauri/omniget-core/src/platforms/bluesky.rs:146

    async fn fetch_post(&self, user: &str, post_id: &str) -> anyhow::Result<serde_json::Value> {
        let uri = format!("at://{}/app.bsky.feed.post/{}", user, post_id);
        let url = format!(
            "{}?depth=0&parentHeight=0&uri={}",
            API_BASE,
            urlencoding::encode(&uri)
        );

        let response = self.client.get(&url).send().await?;

        if !response.status().is_success() {
            return Err(anyhow!("Bluesky API retornou HTTP {}", response.status()));
        }

        let json: serde_json::Value = response.json().await?;

        if let Some(error) = json.get("error").and_then(|e| e.as_str()) {
            return match error {
                "NotFound" | "InternalServerError" => Err(anyhow!("Post not available")),
                "InvalidRequest" => Err(anyhow!("Unsupported link")),
                _ => Err(anyhow!("Erro da API: {}", error)),
            };
        }

        Ok(json)
    }
}

enum BlueskyMedia {
    Video { hls_url: String },
    Images { urls: Vec<String> },
    Gif { url: String },
}

fn extract_media(embed: &serde_json::Value) -> Option<BlueskyMedia> {
    let embed_type = embed.get("$type")?.as_str()?;

View on GitHub (pinned to 8600b91f42)