{"record":{"id":"a21e7eb42011b241","repo":"tonhowtf/omniget","slug":"no-downloadable-media-found-for-this-tweet-it-may-be-text-a21e7e","errorCode":null,"errorMessage":"No downloadable media found for this tweet (it may be text-only, protected, or deleted)","messagePattern":"No downloadable media found for this tweet \\(it may be text-only, protected, or deleted\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/src/platforms/twitter/mod.rs","lineNumber":879,"sourceCode":"                    opts.download_mode.as_deref(),\n                    opts.format_id.as_deref(),\n                    opts.filename_template.as_deref(),\n                    opts.referer.as_deref().or(Some(\"https://x.com/\")),\n                    opts.cancel_token.clone(),\n                    None,\n                    opts.concurrent_fragments,\n                    false,\n                    &extra_flags,\n                    opts.audio_format.as_deref(),\n                )\n                .await;\n            }\n        }\n\n        let count = info.available_qualities.len();\n\n        if count == 0 {\n            anyhow::bail!(\n                \"No downloadable media found for this tweet (it may be text-only, protected, or deleted)\"\n            );\n        }\n\n        if count == 1 {\n            let quality = info.available_qualities.first().unwrap();\n            let filename = format!(\n                \"{}.{}\",\n                sanitize_filename::sanitize(&info.title),\n                quality.format\n            );\n            let output = opts.output_dir.join(&filename);\n\n            let bytes = direct_downloader::download_direct(\n                &self.client,\n                &quality.url,\n                &output,\n                progress,","sourceCodeStart":861,"sourceCodeEnd":897,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/src/platforms/twitter/mod.rs#L861-L897","documentation":"anyhow::bail! aborts the tweet `download` flow when, after fetching tweet metadata, `info.available_qualities` is empty — i.e. the tweet exists and was parsed but contains no downloadable media entries. Twitter tweets can be text-only, protected (private accounts), or deleted, in which case there is nothing to download.","triggerScenarios":"Calling download with a Twitter URL whose tweet has no media entities (text-only tweet), whose account is protected so media isn't exposed to the caller, or which was deleted after metadata lookup produced an empty quality list.","commonSituations":"User pastes a link to a plain text tweet expecting video; tweet from a private/protected account; tweet deleted or account suspended between URL submission and download; API returned a truncated/unauthenticated response stripping media.","solutions":["Verify the tweet actually contains an image or video by opening it in a browser while logged out","If the account is protected, authenticate or make the media accessible — the downloader cannot see protected media","Re-check the tweet is not deleted (404 in browser) and use the canonical twitter.com/x.com status URL","Handle the empty-media case in UI: filter text-only URLs before invoking download"],"exampleFix":"// before\nif info.available_qualities.is_empty() { /* crash path in caller */ }\n// after\nif info.available_qualities.is_empty() {\n    eprintln!(\"tweet has no media; skipping download\");\n    return Ok(None);\n}","handlingStrategy":"validation","validationCode":"fn tweet_has_media(info: &TweetInfo) -> bool { !info.available_qualities.is_empty() }\nif !tweet_has_media(&info) { eprintln!(\"skipping: no downloadable media\"); return Ok(None); }","typeGuard":"fn has_media(info: &TweetInfo) -> bool { !info.available_qualities.is_empty() }","tryCatchPattern":null,"preventionTips":["Check the tweet in a browser before downloading","Skip text-only URLs early in bulk pipelines","Authenticate for protected accounts or skip them"],"tags":["rust","anyhow","twitter","no-media"],"backgroundTag":"empty-result-set","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"}