-
Notifications
You must be signed in to change notification settings - Fork 838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(node-sdk): use warn log level when enabled plugin arent installed #1526
chore(node-sdk): use warn log level when enabled plugin arent installed #1526
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1526 +/- ##
=======================================
Coverage 93.82% 93.83%
=======================================
Files 154 154
Lines 4762 4765 +3
Branches 951 954 +3
=======================================
+ Hits 4468 4471 +3
Misses 294 294
|
`PluginLoader#load: could not load plugin ${modulePath} of module ${name}. Error: ${e.message}` | ||
} catch (err) { | ||
const logLevel = | ||
err instanceof Error && err.message.match(/Cannot find module/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to match on error.code
which is a more stable error identifier?
https://nodejs.org/api/errors.html#errors_error_code
https://nodejs.org/api/errors.html#errors_err_module_not_found
https://nodejs.org/api/errors.html#errors_module_not_found
Closing because @obecny will refactor the plugin loader and it will not be a problem (ref #1124 (comment)) |
Fixes #1124