From a9ad2a2146e8caeaa834cbab3d0cfca693c22dcf Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Thu, 16 May 2024 08:28:12 -0700 Subject: [PATCH] Improve k8s not found pod status --- src/pages/api/kubernetes/status/[...service].js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/api/kubernetes/status/[...service].js b/src/pages/api/kubernetes/status/[...service].js index f771d69df..7d9500387 100644 --- a/src/pages/api/kubernetes/status/[...service].js +++ b/src/pages/api/kubernetes/status/[...service].js @@ -43,8 +43,9 @@ export default async function handler(req, res) { if (pods.length === 0) { res.status(404).send({ - error: `no pods found with namespace=${namespace} and labelSelector=${labelSelector}`, + status: "not found", }); + logger.error(`no pods found with namespace=${namespace} and labelSelector=${labelSelector}`); return; } const someReady = pods.find((pod) => pod.status.phase === "Running");