ackintosh / ganesha

:elephant: A Circuit Breaker pattern implementation for PHP applications.
https://ackintosh.github.io/ganesha/
MIT License
585 stars 42 forks source link

[GuzzleMiddleware + GaneshaHttpClient] Option to trigger failure on 5xx response #73

Closed pvgnd closed 3 years ago

pvgnd commented 3 years ago

It would be nice to be able to configure GuzzleMiddleware & GaneshaHttpClient to trigger failure instead of success on 5xx response from the server.

For example, a service responding 500 errors because of an overloaded database would be happy that Ganesha break off.

pvgnd commented 3 years ago

I will start to work on this feature when GaneshaHttpClient will be merged

ackintosh commented 3 years ago

@pvgnd Thanks for this issue! It looks a good idea.

I will have another look for https://github.com/ackintosh/ganesha/pull/69 (probably on this weekend).