tonhowtf/omniget · error · anyhow::Error

No GIF URL available

Error message

No GIF URL available

What it means

During a Bluesky GIF download, the downloader takes the first entry of `info.available_qualities` and errors when that list is empty. It means the platform layer produced MediaInfo for a GIF but never populated any downloadable quality/URL entry, so there is nothing to pass to the direct downloader.

Solutions

  1. Check why `available_qualities` is empty before download: log the MediaInfo produced by get_media_info and fix the URL-extraction code for GIF blobs.
  2. Verify the post/media still exists and is publicly accessible on Bluesky.
  3. Construct a fallback GIF URL from the blob CID/ref when the qualities list is empty.
  4. Return a more descriptive error that includes the post URL to aid debugging.

Example fix

// before
let gif_url = &info.available_qualities.first().ok_or_else(|| anyhow!("No GIF URL available"))?.url;
// after
let gif_url = info
    .available_qualities
    .first()
    .map(|q| q.url.clone())
    .or_else(|| info.blob_url.clone())
    .ok_or_else(|| anyhow!("No GIF URL available for post (qualities list empty)"))?;
Defensive patterns

Strategy: validation

Validate before calling

// Rust, before calling download
if info.media_type == MediaType::Gif && info.available_qualities.is_empty() {
    return Err(anyhow!("Skipping GIF download: no URL in available_qualities"));
}

Prevention

When it happens

Trigger: Calling `download` with `MediaType::Gif` info whose `available_qualities` vec is empty — e.g. the Bluesky media parse step found a GIF but failed to extract its blob/CDN URL, or the media record had no embedded variant URLs.

Common situations: Posts with animated GIFs stored as blobs whose URL extraction silently failed, deleted or access-restricted media, or schema changes in the Bluesky API that stop URL population while the media type detection still succeeds.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


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

Appendix: source

Thrown at src-tauri/src/platforms/bluesky/mod.rs:357

                    total_bytes += bytes;
                    last_path = output;

                    let percent = ((i + 1) as f64 / count as f64) * 100.0;
                    let _ = progress.send(ProgressUpdate::percent(percent)).await;
                }

                Ok(DownloadResult {
                    file_path: last_path,
                    file_size_bytes: total_bytes,
                    duration_seconds: 0.0,
                    torrent_id: None,
                })
            }
            MediaType::Gif => {
                let gif_url = &info
                    .available_qualities
                    .first()
                    .ok_or_else(|| anyhow!("No GIF URL available"))?
                    .url;

                let filename = format!("{}.gif", sanitize_filename::sanitize(&info.title));
                let output = opts.output_dir.join(&filename);

                let bytes = direct_downloader::download_direct(
                    &self.client,
                    gif_url,
                    &output,
                    progress,
                    Some(&opts.cancel_token),
                )
                .await?;

                Ok(DownloadResult {
                    file_path: output,
                    file_size_bytes: bytes,
                    duration_seconds: 0.0,

View on GitHub (pinned to 8600b91f42)