The @FeignClient annotation has an attribute fallback, named appropriately. It'd be nice to have an attribute Class<? extends Throwable>[] ignoreExceptions() default {} that doesn't open the circuit for the exceptions listed. Currently, the workaround is to disable feign support (feign.hystrix.enabled=false will do it globally) and annotate the caller of the feign client with com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand. This is more code to implement what I assume is a common use case.
Also, if any ErrorDocoder is present, ignoreExceptions should honor it, that is give the decoder a chance to translate HTTP status code to exceptions.
See the SO thread here for background.
Comment From: starlight36
+1, I'm looking for this feature because our services are using HTTP status code to identify the expected business exception. 4xx response should not to use the fallback method.
Comment From: ledbruno
++
Comment From: tiyunlong
+1
Comment From: WoojinAhn
++
Comment From: spencergibb
Hystrix has entered maintenance mode. This means that the Spring Cloud team will no longer be adding new features to the module. We will fix blocker bugs and security issues, and we will also consider and review small pull requests from the community.