New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rest-Client-Reactive: Custom WebApplicationExceptions
not accessable by MP-Fault-Tolerance
#22832
Comments
If smallrye/smallrye-fault-tolerance#524 was implemented, that would hopefully work. I'll bump that on my priority list. |
Any chance of bumping SmallRye Fault-Tolerance to 5.2.2 for Quarkus 2.7 to use that feature? |
There's no release yet. There will be one soon, but it won't make it into 2.7. |
This is fixed in SmallRye Fault Tolerance 5.3.0, where in the non-compatible mode (which is on by default in Quarkus), exception cause chains are inspected. |
This does not seem to work with Quarkus 2.15.3. Please see this reproducer: https://github.com/AndreasPetersen/quarkus-smallrye-fault-tolerance-exception-cause-chains. The REST client is annotated with
|
Sorry it took me a while to get to this. Your That said, I agree that the documented behavior is pretty much useless when I need to figure out a better definition of cause chain inspection. Filed smallrye/smallrye-fault-tolerance#768 for this. Thanks for the report! |
Describe the bug
When using the retry mechanism of MP-Fault-Tolerance you usually do not want to retry on Status
400
, i.e. bad requests. To achieve that, I annotated a method with@Retry(abortOn = BadRequestException.class)
and converted400
responses to aBadRequestException
in a customResponseExceptionMapper<WebApplicationException>
. That used to work with the old "Resteasy client". Unfortunately, with Rest-Client-Reactive allWebApplicationExceptions
are wrapped by correspondingClientWebApplicationExceptions
, so that theRetry
is not able to distinguish between response codes.See #22777 for another issue regarding exception wrapping.
Expected behavior
Custom
WebApplicationException
types are passed through for interceptors likeRetry
Actual behavior
All
WebApplicationExceptions
are converted toClientWebApplicationExceptions
How to Reproduce?
Output of
uname -a
orver
Microsoft Windows [Version 10.0.19042.1415]
Output of
java -version
openjdk version "11.0.3" 2019-04-16 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.3+7) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.3+7, mixed mode)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.6.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Additional information
No response
The text was updated successfully, but these errors were encountered: