Validate environment variables at startup. resolves #101

This commit is contained in:
ngosang
2021-04-04 18:02:17 +02:00
parent c48d342b9c
commit 8aa7723f45
3 changed files with 33 additions and 8 deletions

View File

@@ -30,12 +30,12 @@ export default (): Solver => {
throw Error(`The solver '${method}' is not a valid captcha solving method.`)
} else {
console.error(e)
throw Error(`An error occured loading the solver '${method}'.`)
throw Error(`An error occurred loading the solver '${method}'.`)
}
}
}
log.info(`Using '${method} to solve the captcha.`);
log.info(`Using '${method}' to solve the captcha.`);
return captchaSolvers[method]
}