I have defined custom ErrorDecoder
for Feign Client with reference to this wiki page.
In my ErrorDecoder
I am reading response body by invoking response.body()
Do I need to close
response in my ErrorDecoder
when reading InputStream
. Or Feign will handle closing of response
?
I checked SynchronousMethodHandler
which invokes custom error decoder. This has finally
block
} finally {
if (shouldClose) {
Util.ensureClosed(response.body());
}
Since there is no guidelines from the wiki page.