Resilience 4j annotations based CircuitBreaker fallback method getting called instead of Feign error decoder

105 views Asked by At

I have a problem related to conflict between circuit breaker of resilience4j and open feign error decoder.

I have implemented both of these but in case of any runtime exception, the code flow never goes to feign error decoder and always land on curcuit breaker fallback method.

I want to throw custom exceptions in a few scenarios and implemented our own exception class and exceptiondecoder method but due to the fallback method mechanism it is not getting called. Also, I need access to Open feign Response class in case of any runtime error calling the API but thats not possible until code flow goes to feign error decoder.

Is there any way to call our own exception class method instead of fallback method?

0

There are 0 answers