From b8f0959bb4672c3b5df940a132b7d1a601660b6a Mon Sep 17 00:00:00 2001 From: Dragan Filipovic Date: Mon, 2 Jan 2023 17:57:33 +0100 Subject: [PATCH] log error and exit --- src/index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/index.js b/src/index.js index ca8fd0f..ea34b2a 100644 --- a/src/index.js +++ b/src/index.js @@ -38,9 +38,10 @@ const run = async () => { }; run() - .then(() => { - console.log('DONE'); + .then((data) => { + console.log('DONE', data); }) - .catch(() => { - console.error('ERROR'); + .catch((error) => { + console.error('ERROR', error.message); + process.exit(1); });