From 9d9d8f7aaaad9ab3114cd3710f5ae9916855ca9f Mon Sep 17 00:00:00 2001 From: FrancescoMolinaro Date: Mon, 18 May 2026 10:04:24 +0200 Subject: [PATCH] [DURACOM-485] fix app/health issue --- server.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server.ts b/server.ts index dab50dddca3..4da5b2f30b7 100644 --- a/server.ts +++ b/server.ts @@ -667,11 +667,13 @@ function healthCheck(req, res) { const baseUrl = `${REST_BASE_URL}${environment.actuators.endpointPath}`; fetch(baseUrl) .then((response) => { - res.status(response.status).send(response); + return response.json().then((data) => { + res.status(response.status).send(data); + }); }) .catch((error) => { - res.status(error.response.status).send({ - error: error.message + res.status(error?.response?.status || 503).send({ + error: error.message, }); }); }