Skip to content

Commit ee8543b

Browse files
authored
chore(compass): update failed to load plugins message COMPASS-6203 (#4809)
1 parent c25c1e6 commit ee8543b

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

packages/hadron-plugin-manager/lib/plugin-manager.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,21 @@ class PluginManager {
6565
})
6666
);
6767
} catch (e) {
68-
log.warn(
69-
mongoLogId(1_001_000_142),
70-
'Hadron Plugin Manager',
71-
'Failed to load plugins',
72-
{ path: userPluginPath, message: e.message }
73-
);
68+
if (e?.code === 'ENOENT') {
69+
log.info(
70+
mongoLogId(1_001_000_237),
71+
'Hadron Plugin Manager',
72+
'Plugin folder does not exist, no plugins loaded.',
73+
{ path: userPluginPath }
74+
);
75+
} else {
76+
log.warn(
77+
mongoLogId(1_001_000_142),
78+
'Hadron Plugin Manager',
79+
'Failed to load plugins',
80+
{ path: userPluginPath, message: e.message }
81+
);
82+
}
7483
}
7584
return [];
7685
}

0 commit comments

Comments
 (0)