I am building an express api and have implemented a circuit breaker in it using opossum.
Is there a way for the circuit breaker to ignore the custom HTTP exceptions generated from application?
I have tried adding the errorFilter option but getting the same issue. It is still considering it as a circuit failure.
const options: CircuitOptions = {
timeout: 3000, // If function takes longer than 3 seconds, trigger a failure
errorThresholdPercentage: 50, // When 50% of the requests fail, trip the circuit
resetTimeout: 30000, // After 30 seconds try again
errorFilter: err => {
// Filtering out Http404Error here.
return err.status === 404 // Not Working
}
}