Whenever you're trying to set up a complex body decoder (like SpringDecoder) the validation step passes null for response body which causes body decoder to throw NPE, which propagates as IllegalStateException. Setting the response body as Optional doesn't do anything because Optional type is not accounted for processing in feign.optionals.OptionalDecoder (Something about type parametricity details missing).
UPD: Injection of raw response entity doesn't work as well.
Whenever you're trying to set up a complex body decoder (like
SpringDecoder
) the validation step passes null for response body which causes body decoder to throw NPE, which propagates as IllegalStateException. Setting the response body as Optional doesn't do anything because Optional type is not accounted for processing infeign.optionals.OptionalDecoder
(Something about type parametricity details missing).UPD: Injection of raw response entity doesn't work as well.