Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Any error triggers the circuit breaker #82

Open
ruiaraujo opened this issue Jul 3, 2019 · 1 comment
Open

Any error triggers the circuit breaker #82

ruiaraujo opened this issue Jul 3, 2019 · 1 comment

Comments

@ruiaraujo
Copy link
Contributor

ruiaraujo commented Jul 3, 2019

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.

@grassator
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants