feign error decode1 open feign error decoder custom 오픈페인을 사용하면서 발생되는 오류에 대한 컨트롤을 커스텀 하게 구현 할 수 있다. ErrorDecoder 를 상속받아 구현하면 된다. HTTP method 에 따라 응답값을 확인하고 익셉션을 다르게 설정 한다. 만약 circuit breaker 기능중 retry 기능을 사용하기 위해서는 exception 을 꼭 RetryableException을 사용하여야 한다. 다른 익셉션을 던지면 retry 는 설정해도 동작 되지 않는다. @Slf4j public class GlobalCustomErrorDecoder implements ErrorDecoder { @Override public Exception decode(String methodKey, Response response) { log.warn("gl.. 2022. 1. 14. 이전 1 다음 728x90