Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor (options = {}) {
super('happn')
this._options = _.defaults(options, defaultOptions)
this._happn = new HappnWrapper()
Health.addCheck(this.name, () => new Promise((resolve, reject) => {
if (this._happn.circuitBreaker.isOpen()) {
return reject(new Error(`circuit breaker is open`))
} else {
return resolve()
}
}))
}