Closed errrrk closed 3 years ago
@errrrk A gist of the test case is a good starting point, however since I can't run that without the surrounding code it is less than ideal for debugging the issue.
@errrrk The current design of jsonStream
is to ignore the body for failed requests. If you use the standard retrieve
/exchange
it works as you expect
Gist - Clear and apologies. Mostly due to time constraints on my side.
retrieve
/exchange
- Thanks, I'll give that a try.
If the error type is provided via the @Client
annotation, the body will now be read on error
@graemerocher suggested to create this bug report.
See also https://gitter.im/micronautfw/questions?at=5c9a35b12fb6800d8083f9f0
Task List
Steps to Reproduce
onErrorResumeNext()
on the call. Try to read json bodyExpected Behaviour
When reading JSON body in
onErrorResumeNext()
I'd expect the response to have the JSON body available. In this particular case because I want to read an error code from the JSON body and take a different course of action in case of a specific error code.Actual Behaviour
When reading JSON body in
onErrorResumeNext()
the response isOptional.empty
.Environment Information
Example Application
https://gist.github.com/errrrk/821386de19ec016aa0b7dc4668431785