From a72a27a8b5b8428a1786c2b1a9930945dde2151d Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Sun, 17 Sep 2023 10:05:45 -0700 Subject: [PATCH] Maybe handle k8s traefik ingress routes returns nothing --- src/utils/config/service-helpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/config/service-helpers.js b/src/utils/config/service-helpers.js index de47cfdf..921d3ef6 100644 --- a/src/utils/config/service-helpers.js +++ b/src/utils/config/service-helpers.js @@ -166,7 +166,7 @@ export async function servicesFromKubernetes() { const traefikIngressListContaino = await crd .listClusterCustomObject("traefik.containo.us", "v1alpha1", "ingressroutes") - .then((response) => response.body) + .then((response) => response.body ?? []) .catch(async (error) => { if (![403, 404].includes(error.statusCode)) { logger.error( @@ -182,7 +182,7 @@ export async function servicesFromKubernetes() { const traefikIngressListIo = await crd .listClusterCustomObject("traefik.io", "v1alpha1", "ingressroutes") - .then((response) => response.body) + .then((response) => response.body ?? []) .catch(async (error) => { if (![403, 404].includes(error.statusCode)) { logger.error(