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 May 2, 2024
1 parent d1f778f commit 62761df
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 @@ -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 62761df

Please sign in to comment.