{"record":{"id":"4b41836004567c52","repo":"tonhowtf/omniget","slug":"no-media-found-in-pin-mod","errorCode":null,"errorMessage":"No media found in pin {}","messagePattern":"No media found in pin (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/src/platforms/pinterest/mod.rs","lineNumber":324,"sourceCode":"            return Ok(MediaInfo {\n                title: format!(\"pinterest_{}\", pin_id),\n                author: String::new(),\n                platform: \"pinterest\".to_string(),\n                duration_seconds: None,\n                thumbnail_url: None,\n                available_qualities: vec![VideoQuality {\n                    label: \"original\".to_string(),\n                    width: 0,\n                    height: 0,\n                    url: image_url,\n                    format: format.to_string(),\n                }],\n                media_type,\n                file_size_bytes: None,\n            });\n        }\n\n        Err(anyhow!(\"No media found in pin {}\", pin_id))\n    }\n}\n","sourceCodeStart":306,"sourceCodeEnd":327,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/src/platforms/pinterest/mod.rs#L306-L327","documentation":"native_get_media_info in the Pinterest platform module parsed the pin's media list but none of its entries matched the expected image/video shapes, so it fell through to a generic anyhow error. The library throws this when a pin exists but contains no downloadable media object (or an unrecognized media shape).","triggerScenarios":"Calling get_media_info on a Pinterest pin whose media list is empty, or whose media entries have a type/URL structure the parser does not recognize (e.g. idea pins, story pins, or pins whose 'media' field only carries metadata without image/video URLs).","commonSituations":"Pinning a text-only or repinned idea pin; Pinterest API returning a pin shape without 'images'/'video_list' for newer pin types; a deleted or region-restricted pin whose media was stripped; API schema drift after Pinterest changes the response format.","solutions":["Open the pin URL in a browser to confirm it actually has downloadable media; skip idea/story pins which this parser does not support.","Log the raw pin JSON before parsing and extend parse_media to handle the missing media shape (e.g. 'carousel_data' or 'story_pin_data').","Check that the pin_id extracted from the URL is correct and not a board/slug fragment.","Update the app: newer versions may already cover the new Pinterest pin schema.","Surface a user-facing 'pin has no downloadable media' message instead of retrying."],"exampleFix":"// before\nlet media = Self::parse_media(&data).ok_or_else(|| anyhow!(\"No media found in pin {}\", pin_id))?;\n// after\nlet media = Self::parse_media(&data).ok_or_else(|| {\n    tracing::debug!(\"pin {} json: {}\", pin_id, serde_json::to_string(&data).unwrap_or_default());\n    anyhow!(\"Pin {} has no supported media (idea/story pins are not downloadable)\", pin_id)\n})?;","handlingStrategy":"validation","validationCode":"// before calling get_media_info\nlet is_idea_or_story_pin = data.pointer(\"/story_pin_data\").is_some()\n    || data.pointer(\"/media\") .map(|m| m.get(\"images\").is_none() && m.get(\"video\").is_none()).unwrap_or(true);\nif is_idea_or_story_pin { return Err(\"pin has no downloadable media\"); }","typeGuard":"fn has_downloadable_media(pin: &serde_json::Value) -> bool {\n    pin.pointer(\"/images\").map(|v| v.as_object().map_or(false, |o| !o.is_empty())).unwrap_or(false)\n        || pin.pointer(\"/video_list\").map(|v| v.as_array().map_or(false, |a| !a.is_empty())).unwrap_or(false)\n}","tryCatchPattern":"match get_media_info(url).await {\n    Err(e) if e.to_string().contains(\"No media found in pin\") => skip_pin_with_notice(url),\n    Err(e) => return Err(e),\n    Ok(info) => download(info).await?,\n}","preventionTips":["Skip idea/story pins before requesting media info","Log raw pin JSON to catch Pinterest schema drift early","Validate the pin URL points to an actual pin, not a board or user page","Treat this as a permanent per-pin outcome — never retry"],"tags":["pinterest","media-parsing","empty-result"],"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"}