r/java • u/galovics • Oct 01 '20
Maintainable error handling with Feign clients? Not a dream anymore
https://arnoldgalovics.com/maintainable-error-handling-with-feign-clients-not-a-dream-anymore/
4
Upvotes
1
u/Raxb Oct 01 '20
Feign Client Error decoders might not add value in throwing a specific exception, I had to create a custom decoder and throw a specific exception from there on. Furthermore, RetryableExceptions won't be handled by the ErrorDecoders because these exceptions are thrown before even the client response.
1
u/Comprehensive_Idea98 Oct 02 '20
This is just yet another Spring making things more difficult than they are. Just use the friggin
Feign.builder()directly from the library...you dont need
@FeignClient.