OpenFeign/feign

ErrorDecoder not invoked when Apache Http client throws checked exception

Closed

#1,487 opened on Aug 17, 2021

 (8 comments) (0 reactions) (1 assignee)Java (1,911 forks)batch import
buggood first issuehelp wanted

Repository metrics

Stars
 (9,070 stars)
PR merge metrics
 (Avg merge 2d 17h) (71 merged PRs in 30d)

Description

Hi, I have discovered issue when using feign.httpclient.ApacheHttpClient. In some cases Apache client throws ProtocolException which is a checked exception. This happens for example when server returned 303 HTTP code but there was no location header. In such case Feign proxy throws UndeclaredThrowableException instead of invoking ErrorDecoder.

Contributor guide