Skip to content

Commit

Permalink
Change default resolver error message for custom specifiers (#9378)
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed May 9, 2024
1 parent eb54820 commit 69e4161
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/node-bindings/src/resolver.rs
Expand Up @@ -343,6 +343,12 @@ impl Resolver {
"esm" => SpecifierType::Esm,
"commonjs" => SpecifierType::Cjs,
"url" => SpecifierType::Url,
"custom" => {
return Err(napi::Error::new(
napi::Status::InvalidArg,
"Unsupported specifier type: custom",
))
}
_ => {
return Err(napi::Error::new(
napi::Status::InvalidArg,
Expand Down

0 comments on commit 69e4161

Please sign in to comment.