From 96431c60857008482c78ce8419c9b6f5a5851719 Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sat, 21 Dec 2024 19:26:02 -0800 Subject: [PATCH] Chore: warn and dont fail for invalid services (#4468) --- src/utils/config/service-helpers.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index 02743682b..53fe47cc8 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -25,6 +25,10 @@ function parseServicesToGroups(services) { const serviceGroupServices = []; serviceGroup[name].forEach((entries) => { const entryName = Object.keys(entries)[0]; + if (!entries[entryName]) { + logger.warn(`Error parsing service "${entryName}" from config. Ensure required fields are present.`); + return; + } if (Array.isArray(entries[entryName])) { groups = groups.concat(parseServicesToGroups([{ [entryName]: entries[entryName] }])); } else {