Changed fatal to error and added error handling to promise catch in main
This commit is contained in:
10
src/main.js
10
src/main.js
@@ -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);
|
||||
});
|
||||
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user