perron icon indicating copy to clipboard operation
perron copied to clipboard

Any error triggers the circuit breaker

Open ruiaraujo opened this issue 5 years ago • 1 comments

Due to how https://github.com/zalando-incubator/perron/blob/master/lib/client.ts#L606-L608 looks like, any error thrown can trigger the circuit breaker even if the request was never made.

This increases the impact of bugs in perron or the underlying Node implementation.

My expectation is that the circuit breaker would be notified of error only once the request had been made to the backend.

ruiaraujo avatar Jul 03 '19 06:07 ruiaraujo

We could either hardcode this logic or provide a config option with a function that would filter things out. In 0.9.0 more detailed error information was added, so we could probably look at the error constructor to figure out what happened.

grassator avatar Jul 03 '19 13:07 grassator