OpenFeign / feign

Feign makes writing java http clients easier
Apache License 2.0
9.49k stars 1.93k forks source link

Annotation-error-decoder does not provide feign.Response object in @FeignExceptionConstructor #2504

Open aiwprton805 opened 2 months ago

aiwprton805 commented 2 months ago

I encountered a problem when trying to access both the ResponseBody and HTTP status in my @FeignExceptionConstructor. While I could create multiple exception classes for each HTTP status, my goal is to use a single default exception that can provide access to the ResponseBody AND feign.Response (HTTP status at least) in exception constructor.

kdavisk6 commented 1 month ago

@FeignExceptionConstructor is part of Spring Cloud OpenFeign. I recommend using their support channels for more help.