diff --git a/control-plane/src/index.ts b/control-plane/src/index.ts index 40b2b29d..9fde2565 100644 --- a/control-plane/src/index.ts +++ b/control-plane/src/index.ts @@ -107,6 +107,15 @@ app.addHook("onRequest", (request, _reply, done) => { ); }); +app.addHook('onResponse', async (request, reply) => { + if (request.routerPath === '/live' && reply.statusCode >= 400) { + logger.warn('Live endpoint returned error', { + statusCode: reply.statusCode, + path: request.url + }) + } +}); + const startTime = Date.now(); (async function start() {