From a453444318e73c06183eb753a575af439cfec6b5 Mon Sep 17 00:00:00 2001 From: smart_ex Date: Fri, 13 May 2022 17:31:42 +1000 Subject: [PATCH] log healthWatcher errors --- src/healthWatcher.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/healthWatcher.js b/src/healthWatcher.js index ac0ca3c..5f2c673 100644 --- a/src/healthWatcher.js +++ b/src/healthWatcher.js @@ -1,6 +1,6 @@ const Web3 = require('web3') const { toBN, fromWei } = require('web3-utils') -const { setSafeInterval } = require('./utils') +const { setSafeInterval, logRelayerError } = require('./utils') const { httpRpcUrl, privateKey, minimumBalance, nativeCurrency, instances } = require('./config') const web3 = new Web3(httpRpcUrl) @@ -19,6 +19,7 @@ async function main() { await redis.hset('health', { status: true, error: '' }) } catch (e) { console.error('healthWatcher', e.message) + await logRelayerError(redis, e) await redis.hset('health', { status: false, error: e.message }) } }