Changed fatal to error and added error handling to promise catch in main

This commit is contained in:
2021-11-26 18:36:35 +01:00
parent c51cfc1b14
commit 3a927688d0
2 changed files with 14 additions and 8 deletions

View File

@@ -31,7 +31,13 @@ if(errorMsg){
org: env.INFLUX_ORG,
name: env.INFLUX_BUCKET
})})
.then((res) => {})
.catch(exit(1));
.catch((err) => {
if(err) {
logger.error("Error whilst checking influx:");
logger.error(err);
}
logger.fatal("Setup influx failed!");
exit(1);
});
})();