From ee8543b240d2f400b8053d5f261c4bc6d59dcf32 Mon Sep 17 00:00:00 2001 From: Rhys Date: Thu, 7 Sep 2023 11:00:13 -0400 Subject: [PATCH] chore(compass): update failed to load plugins message COMPASS-6203 (#4809) --- .../lib/plugin-manager.js | 21 +++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/packages/hadron-plugin-manager/lib/plugin-manager.js b/packages/hadron-plugin-manager/lib/plugin-manager.js index 3392a66ae0d..6a9b96a234b 100644 --- a/packages/hadron-plugin-manager/lib/plugin-manager.js +++ b/packages/hadron-plugin-manager/lib/plugin-manager.js @@ -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 []; }