Skip to content

Commit

Permalink
Change default resolver error message for custom specifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Nov 11, 2023
1 parent d58e336 commit 5cd44b3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/node-bindings/src/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,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 5cd44b3

Please sign in to comment.