OpenFeign / feign

Feign makes writing java http clients easier
Apache License 2.0
9.42k stars 1.92k forks source link

Cannot get a response body from FeignException #2391

Closed vitalijr2 closed 4 months ago

vitalijr2 commented 4 months ago

This issue may be related with earlier one #1268

I have met this issue when work with Allegro: API returns headers and body for 4** errors. I can get some valuable headers like trace-id but error body is empty. It looks strange because the exception message contains beggining of the response body.

I have tried both responseBody.ifPresent and contentUTF8.

P.S. I haven't investigated what the cause is yet, so I just created this general description of the problem

vitalijr2 commented 4 months ago

The issue is disappeared.