Skip to content

Commit

Permalink
fixup lint
Browse files Browse the repository at this point in the history
  • Loading branch information
benzekrimaha committed Jun 19, 2024
1 parent 9ea4da7 commit 4ca3043
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CircuitBreaker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class CircuitBreaker extends EventEmitter {
return this._aggregateState;
}

get promErr(): Boolean {
get promErr(): boolean {
return this._promError;
}

Expand All @@ -69,7 +69,7 @@ export class CircuitBreaker extends EventEmitter {

async _evaluate() {
this._evaluatingPromiseHook = Promise.allSettled(this._probes.map(p => p.check().catch(error => {
if (error.message === 'Failed to query Prometheus') {
if (error instanceof Error && error.message === 'Failed to query Prometheus') {
this._promError = true;
}
return 'failed';
Expand Down

0 comments on commit 4ca3043

Please sign in to comment.