DC-130 rev3: log.error on unexpected bridge status in /status + test asserting the log call (13 tests green)
CI / Test & Lint (push) Waiting to run
CI / Security audit (push) Waiting to run

This commit is contained in:
DashCaddy Polish Loop
2026-09-14 04:19:55 -07:00
parent 121caef488
commit 65a447e27e
2 changed files with 29 additions and 5 deletions
+6 -1
View File
@@ -136,7 +136,12 @@ module.exports = function ({ asyncHandler, log, auditLogger, fetchT }) {
}
if (status !== 200) {
// malformed upstream route or other unexpected bridge failure
return errorResponse(res, 502, body && body.error ? body.error : 'unexpected bridge response');
log.error('deploys', 'status probe: unexpected bridge response', {
service,
status,
bridgeError: body && body.error ? String(body.error).slice(0, 200) : 'none',
});
return errorResponse(res, 502, 'shipdeck bridge protocol error (unexpected response, status ' + status + ')');
}
return ok(res, { ok: body.ok === true, output: body.output || '' });
}));