{"record":{"id":"4007a2193d960747","repo":"tonhowtf/omniget","slug":"instagram-stories-are-not-supported-only-public-posts-reels-4007a2","errorCode":null,"errorMessage":"Instagram Stories are not supported. Only public posts, reels and carousels.","messagePattern":"Instagram Stories are not supported\\. Only public posts, reels and carousels\\.","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"warning","filePath":"src-tauri/src/platforms/instagram/mod.rs","lineNumber":668,"sourceCode":"        \"instagram\"\n    }\n\n    fn can_handle(&self, url: &str) -> bool {\n        if let Ok(parsed) = url::Url::parse(url) {\n            if let Some(host) = parsed.host_str() {\n                let host = host.to_lowercase();\n                return host == \"instagram.com\"\n                    || host.ends_with(\".instagram.com\")\n                    || host == \"ddinstagram.com\"\n                    || host.ends_with(\".ddinstagram.com\");\n            }\n        }\n        false\n    }\n\n    async fn get_media_info(&self, url: &str) -> anyhow::Result<MediaInfo> {\n        if Self::is_story_url(url) {\n            return Err(anyhow!(\n                \"Instagram Stories are not supported. Only public posts, reels and carousels.\"\n            ));\n        }\n\n        let post_id = if let Some(share_id) = Self::extract_share_id(url) {\n            let resolved = self.resolve_share_link(&share_id).await?;\n            Self::extract_post_id(&resolved).ok_or_else(|| anyhow!(\"Could not extract post ID\"))?\n        } else {\n            Self::extract_post_id(url).ok_or_else(|| anyhow!(\"Could not extract post ID\"))?\n        };\n\n        let filename_base = format!(\"instagram_{}\", post_id);\n\n        let embed_result = self.request_embed(&post_id).await;\n        let media = match embed_result {\n            Ok(data) => Self::extract_media_from_embed(&data),\n            Err(_embed_err) => match self.request_gql(&post_id).await {\n                Ok(data) => Self::extract_media_from_gql(&data),","sourceCodeStart":650,"sourceCodeEnd":686,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/src/platforms/instagram/mod.rs#L650-L686","documentation":"An explicit feature gate: `get_media_info` rejects any URL whose path starts with `/stories/` via `is_story_url`. Instagram Stories require authentication and an ephemeral-media model the downloader does not implement, so story URLs fail fast with this message instead of attempting extraction.","triggerScenarios":"Passing any Instagram story URL (path beginning `/stories/<user>/<id>`) to `InstagramDownloader::get_media_info`. Only public posts (`/p/`), reels (`/reel/`, `/reels/`), IGTV (`/tv/`), and resolvable `/share/` links are supported.","commonSituations":"Users paste a story link copied from the Instagram app; a share link redirects to a story URL after `resolve_share_link`; automation feeds story URLs without pre-filtering.","solutions":["Ask the user for the regular post/reel URL instead of a story link, or download the story manually","Pre-filter URLs client-side: reject any URL whose path starts with `/stories/` before calling `get_media_info`","If story support is needed, implement an authenticated story fetch (session cookies + story GraphQL endpoints) in the platform module","Handle the error gracefully in the UI with a clear 'stories unsupported' message"],"exampleFix":"// before\nlet info = downloader.get_media_info(user_url).await?;\n// after\nif url::Url::parse(&user_url).map(|u| u.path().to_lowercase().starts_with(\"/stories/\")).unwrap_or(false) {\n    anyhow::bail!(\"Instagram Stories are not supported by this downloader\");\n}\nlet info = downloader.get_media_info(&user_url).await?;","handlingStrategy":"validation","validationCode":"fn is_instagram_story(url: &str) -> bool {\n    url::Url::parse(url)\n        .map(|u| u.path().to_lowercase().starts_with(\"/stories/\"))\n        .unwrap_or(false)\n}\n// call before: if is_instagram_story(&user_url) { bail!(\"stories unsupported\"); }","typeGuard":"fn is_supported_ig_url(url: &str) -> bool {\n    url::Url::parse(url).ok()\n        .map(|u| {\n            let segs: Vec<&str> = u.path().split('/').filter(|s| !s.is_empty()).collect();\n            matches!(segs.first(), Some(&\"p\") | Some(&\"reel\") | Some(&\"reels\") | Some(&\"tv\"))\n                || segs.first() == Some(&\"share\")\n        })\n        .unwrap_or(false)\n}","tryCatchPattern":"match downloader.get_media_info(&url).await {\n    Err(e) if e.to_string().contains(\"Stories are not supported\") => {\n        ui.show_notice(\"Instagram Stories are not supported; use the post or reel URL\");\n    }\n    other => other?,\n}","preventionTips":["Filter out /stories/ URLs at the input layer before dispatching to the Instagram downloader","Show users which link types are supported (public posts, reels, carousels) in the UI","Resolve /share/ links and re-check the resolved path for /stories/ before extraction","Add a unit test covering is_story_url with typical story, post, and share links"],"tags":["instagram","unsupported-feature","stories","validation"],"backgroundTag":"unsupported-operation","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"}