Skip to content

Commit

Permalink
chore(compass): update failed to load plugins message COMPASS-6203 (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Anemy authored Sep 7, 2023
1 parent c25c1e6 commit ee8543b
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions packages/hadron-plugin-manager/lib/plugin-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,21 @@ class PluginManager {
})
);
} catch (e) {
log.warn(
mongoLogId(1_001_000_142),
'Hadron Plugin Manager',
'Failed to load plugins',
{ path: userPluginPath, message: e.message }
);
if (e?.code === 'ENOENT') {
log.info(
mongoLogId(1_001_000_237),
'Hadron Plugin Manager',
'Plugin folder does not exist, no plugins loaded.',
{ path: userPluginPath }
);
} else {
log.warn(
mongoLogId(1_001_000_142),
'Hadron Plugin Manager',
'Failed to load plugins',
{ path: userPluginPath, message: e.message }
);
}
}
return [];
}
Expand Down

0 comments on commit ee8543b

Please sign in to comment.