Description
Hi.
I'm a long time JAX-RS client proxy user which likes the usage of interface generated clients very much. Now I wanted to give feign a try and see how it performs. Setup is simple and integrates nicely in the Spring ecosystems.
But there are still some things which are quite inconvenient and IMHO better solved in JAX-RS.
E.g. 302 handling of errors. JAX-RS won't throw exceptions if 302 is encountered. I already read #249 about the several "workarounds" that I'm not very keen of.
Why not just providing an option in the builder whether to throw or to ignore 302 and leaving the default as before to keep backwards compatibility?
Even If I would try to live with the exception that is thrown, how do I get access to the Response
? Since in our case when 302 is returned, the payload contains information we need. FeignException
sadly doesn't expose the Response
. Also JAX-RS does a better job here where I have access to the response and so the payload. It even provides concrete exception types for well known statuses which make it easy to handle specific error cases.
I would love at least to see that exposing of the response in FeignException
to gain more control. Now I have to write my own decoder/error handler and throw my own RedirectException
and putting the response to it, being able to process it in the code.