Skip to content

Commit 4353dd9

Browse files
authored
Merge pull request #63 from NHSDigital/apm-2078-fix-status-not-logging-content-body
APM-2078 Fix _status not loggin content body
2 parents edc841b + a6f5238 commit 4353dd9

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

proxies/live/apiproxy/resources/jsc/HealthCheck.SetResponse.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ const timeout = (healthcheck_status_code === null && healthcheck_failed) ? "true
1919

2020
const final_status = (healthcheck_status !== "pass") ? "fail" : "pass";
2121

22-
// context.setVariable("status.response", JSON.stringify(response));
23-
context.setVariable("response.content", JSON.stringify( {
22+
const resp = {
2423
"status" : final_status,
2524
"version" : "{{ DEPLOYED_VERSION }}" ,
2625
"revision" : apiproxy_revision,
@@ -35,6 +34,8 @@ context.setVariable("response.content", JSON.stringify( {
3534
"links" : {"self": healthcheck_request_url}
3635
}
3736
}
38-
}));
37+
};
3938

39+
context.setVariable("status.response", JSON.stringify(resp));
40+
context.setVariable("response.content", JSON.stringify(resp));
4041
context.setVariable("response.header.Content-Type", "application/json");

0 commit comments

Comments
 (0)