diff --git a/healthcheck.js b/healthcheck.js index e179299..05dedba 100644 --- a/healthcheck.js +++ b/healthcheck.js @@ -35,13 +35,13 @@ axios process.exit(1) }) -async function notify(message) { +async function notify (message) { console.log(message) if (shouldSendEmail) await sendMail(message) if (shouldPostToWebHook) await postToWebHook(message) } -async function postToWebHook(text) { +async function postToWebHook (text) { await axios .post(process.env.HEALTH_CHECK_WEB_HOOK, { text }) .catch((error) => { @@ -49,7 +49,7 @@ async function postToWebHook(text) { }) } -async function sendMail(message) { +async function sendMail (message) { const messageParams = { from: process.env.HEALTH_CHECK_EMAIL_FROM, to: process.env.HEALTH_CHECK_EMAIL_RECIPIENT, diff --git a/src/app.js b/src/app.js index 6b7899d..3adfe77 100644 --- a/src/app.js +++ b/src/app.js @@ -34,8 +34,7 @@ export async function build (opts = {}) { `${req.protocol}://${req.headers.host}/instance/${defaultTenantName}/credentials/issue`, getUnsignedVC() ) - if (!data.proof) - throw new SigningException(503, 'issuer-coordinator healthz failed') + if (!data.proof) { throw new IssuingException(503, 'issuer-coordinator healthz failed') } } catch (e) { console.log(`exception in healthz: ${JSON.stringify(e)}`) return res.status(503).json({