We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2e6896b commit 9d9d8f7Copy full SHA for 9d9d8f7
1 file changed
server.ts
@@ -667,11 +667,13 @@ function healthCheck(req, res) {
667
const baseUrl = `${REST_BASE_URL}${environment.actuators.endpointPath}`;
668
fetch(baseUrl)
669
.then((response) => {
670
- res.status(response.status).send(response);
+ return response.json().then((data) => {
671
+ res.status(response.status).send(data);
672
+ });
673
})
674
.catch((error) => {
- res.status(error.response.status).send({
- error: error.message
675
+ res.status(error?.response?.status || 503).send({
676
+ error: error.message,
677
});
678
679
}
0 commit comments