From f7523ae5e20414dfec597050051566adbba9a310 Mon Sep 17 00:00:00 2001 From: joe fleming Date: Fri, 2 Nov 2018 16:35:26 -0700 Subject: [PATCH] fix: exit on errors --- bin/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/index.js b/bin/index.js index cc97149..483fe0e 100644 --- a/bin/index.js +++ b/bin/index.js @@ -42,7 +42,7 @@ async function run() { // scheduled running if (interval === 0) return; logger.debug(`Starting interval (${interval}s)...`); - runInterval(fetchAndIndex, interval * 1000); + runInterval(() => fetchAndIndex().catch(handleError), interval * 1000); } run().catch(handleError);