Skip to content

Commit

Permalink
throw exception when validate
Browse files Browse the repository at this point in the history
  • Loading branch information
lydoan1199 committed Nov 27, 2023
1 parent 93be776 commit d03b121
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/service/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,7 @@ async function executeJob(jobInfo, keepFiles) {

function validateField(configs, propertyName, configFile = defaultConfigFile) {
if (!configs[propertyName]) {
logger.error(`Please specify '${propertyName}' property in ${path.basename(configFile)}.`);
return false;
throw new Error(`Please specify '${propertyName}' property in ${path.basename(configFile)}.`);
}
return true;
}
Expand Down

0 comments on commit d03b121

Please sign in to comment.