denoland/deno · error
Invalid deep-link scheme {scheme:?}: {reason}.
Error message
Invalid deep-link scheme {scheme:?}: {reason}. What it means
Error "Invalid deep-link scheme {scheme:?}: {reason}." thrown in denoland/deno.
Source
Thrown at cli/tools/desktop.rs:686
}
}
};
match target_os {
"macos" => make_self_extracting_macos(bundle_path, format, desktop_flags),
"windows" => make_self_extracting_dir(bundle_path, format, true),
_ => make_self_extracting_dir(bundle_path, format, false),
}
}
/// Validate a deep-link URL scheme. Follows the RFC 3986 `scheme` grammar:
/// `ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )`. We additionally reject the
/// common reserved schemes (`http`, `https`, `file`, `ftp`, `ws`, `wss`) since
/// registering those as app handlers is almost never intended and would hijack
/// normal browsing.
fn validate_url_scheme(scheme: &str) -> Result<(), AnyError> {
let reserved = ["http", "https", "file", "ftp", "ws", "wss"];
let bail = |reason: &str| {
Err(deno_core::anyhow::anyhow!(
"Invalid deep-link scheme {scheme:?}: {reason}."
))
};
match scheme.chars().next() {
None => return bail("scheme is empty"),
Some(c) if !c.is_ascii_alphabetic() => {
return bail("scheme must start with an ASCII letter");
}
_ => {}
}
if !scheme
.chars()
.all(|c| c.is_ascii_alphanumeric() || matches!(c, '+' | '-' | '.'))
{
return bail("scheme may only contain letters, digits, '+', '-', and '.'");
}
if reserved.contains(&scheme) {
return bail("scheme is reserved and cannot be used as a deep link");View on GitHub (pinned to 89f33cbef2)
When it happens
Trigger: Thrown at cli/tools/desktop.rs:686 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of denoland/deno@89f33cbef2 (2026-08-16).
Data as JSON: /api/errors/ac86b2322a366739.
Report an issue: GitHub.