I am implementing circuit breaker by using Spring cloud circuit breaker abstraction <https://spring.io/projects/spring-cloud-circuitbreaker> with hystrix.
I followed examples from here <https://github.com/spring-cloud-samples/spring-cloud-circuitbreaker-demo/tree/master/spring-cloud-circuitbreaker-demo-hystrix>

By default both HTTP Statuse groups 5.x.x and 4.x.x returned from endpoint are signals to open the circuit.
I would like to limit it only to server errors 5.x.x and exclude 4.x.x like Bad requst. In my case client of the service should be informed his request is incorrect and should not get response from fallback.

I do not know how to implement it. It is importand to me to use Spring Cloud Circuit Breaker abstraction so using @HystrixCommand(ignoreExceptions={...}) is not an option. I would like to configure it in more declarative manner like configuration.