{"record":{"id":"03c4010f369c939e","repo":"herdrdev/herdr","slug":"opening-urls-is-not-supported-on-this-platform","errorCode":null,"errorMessage":"opening URLs is not supported on this platform","messagePattern":"opening URLs is not supported on this platform","errorType":"error_code","errorClass":"io::Error","httpStatus":null,"severity":"warning","filePath":"src/platform/fallback.rs","lineNumber":216,"sourceCode":"\n/// Unsupported platform stub.\npub fn process_exists(_pid: u32) -> bool {\n    false\n}\n\n/// Unsupported platform stub.\npub fn write_clipboard(_bytes: &[u8]) -> bool {\n    false\n}\n\n/// Unsupported platform stub.\npub fn read_clipboard_text() -> Option<String> {\n    None\n}\n\n/// Unsupported platform stub.\npub fn open_url(_url: &str) -> std::io::Result<Option<std::process::Child>> {\n    Err(std::io::Error::new(\n        std::io::ErrorKind::Unsupported,\n        \"opening URLs is not supported on this platform\",\n    ))\n}\n\n/// Unsupported platform stub.\n// Windows does not wire clipboard-image bridging into semantic input yet.\n#[cfg_attr(windows, allow(dead_code))]\npub fn read_clipboard_image() -> Option<ClipboardImage> {\n    None\n}\n\n/// Unsupported platform stub.\npub fn show_desktop_notification(_title: &str, _body: Option<&str>) -> std::io::Result<bool> {\n    Ok(false)\n}\n","sourceCodeStart":198,"sourceCodeEnd":233,"githubUrl":"https://github.com/herdrdev/herdr/blob/f457cff4f2648eee85d176f8a41861241d4e8428/src/platform/fallback.rs#L198-L233","documentation":"open_url on the fallback platform stub always returns Unsupported: Herdr has no mechanism to launch the OS browser/URL handler on this compiled target. Any code path that tries to open a URL (docs links, release notes, etc.) will receive this error.","triggerScenarios":"Calling platform open_url() on a build that uses src/platform/fallback.rs. Every invocation returns Unsupported unconditionally, regardless of the URL string.","commonSituations":"Exotic or in-progress OS ports of Herdr; CI targets compiled without a browser layer. Users on Linux/macOS/Windows never hit it because those modules implement open_url.","solutions":["Run on a supported platform where open_url delegates to xdg-open/open/start","When porting, implement open_url in the target's src/platform/<os>.rs module","As a caller, degrade gracefully: match ErrorKind::Unsupported and show the URL as copyable text instead"],"exampleFix":"// before\nplatform::open_url(&url)?;\n// after\nmatch platform::open_url(&url) {\n    Ok(_) => {}\n    Err(e) if e.kind() == std::io::ErrorKind::Unsupported => copy_to_clipboard(&url),\n    Err(e) => return Err(e),\n}","handlingStrategy":"fallback","validationCode":"// no pre-call check exists; the stub always fails, so probe once\ncan_open_urls = matches!(platform::open_url(\"about:blank\"), Err(e) if e.kind() != std::io::ErrorKind::Unsupported));","typeGuard":null,"tryCatchPattern":"match platform::open_url(url) {\n    Ok(child) => { /* spawned */ }\n    Err(e) if e.kind() == std::io::ErrorKind::Unsupported => show_copyable_link(url),\n    Err(e) => report(e),\n}","preventionTips":["Feature-detect URL opening at startup and degrade to copy-to-clipboard","Never assume a spawned child; open_url returns Option<Child>","Keep links visible as text so users can copy them on any platform"],"tags":["platform","unsupported","url","browser","stub"],"backgroundTag":"unsupported-platform-operation","analyzedSha":"f457cff4f2648eee85d176f8a41861241d4e8428","analyzedAt":"2026-08-28T15:41:09.197Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}