2

Techs:

  • One module with Spring Boot 2.1.7 (starter web, openfeign)

  • Api Gateway With Spring Boot 2.1.3

I wanna capture the error from the feign client to send again on my error message. But when I debug the response it shows nothing on the body. But, when I try to reproduce the same call on Postman the response comes with the body.

I would like to know how I can get the variable the message that is transmitted on Postman and why my request doesn't bring the same body response.

Log trace from feign client

enter image description here

Postman Request

enter image description here

Victor Henrique
  • 327
  • 1
  • 5
  • 16
  • Check this, maybe it will help: https://github.com/OpenFeign/feign/issues/260 – amseager Mar 31 '20 at 21:10
  • I haven't tested the solution above yet, but I could find the error content by using `new String(e.content())` on Exception Handler. In my case, I used AspectJ as the Exception Handler for the Feign Client, But I believe it could be, also, with Feign Decoder or Spring Controller Advice. – Victor Henrique May 08 '20 at 17:56

0 Answers0