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 (classic) - exception mapper not honored with async return types (CompletionStage and Uni) #21175
Comments
/cc @cescoffier, @jponge |
I am suffering from the same issue and I can verify that the workaround is switching from |
I just tried with the Reactive REST Client and the mapper is called. |
It's not an issue related to Mutiny. Same behavior when returning a CompletionStage. |
I've found the issue. In To get the example working, you need to declare the exception explicitly, even if it does not make sense.
The caller would need to catch or declare the exception despite it cannot happen. The fix (that would be in the main RESTEasy codebase) should verify if the mehtod is async and in this case, skip the following check: for (Class exc : method.getExceptionTypes()) {
if (exception != null && exc.isAssignableFrom(exception.getClass())) { This is only for RESTEasy classic. Everything works as expected in Reasteasy Reactive. |
I am going to close this as |
Pinging @jamezp anyway as it might be of interest for RESTEasy. @jamezp see the detailed comment from @cescoffier above ^. |
Thanks @gsmet |
Looks like that the issue has been fixed anyway, I ve upgraded to the latest quarkus version (2.10.2 atm) and my |
Describe the bug
from https://stackoverflow.com/questions/69825357/error-handling-on-quarkus-mutiny-rest-client:
On my quarkus rest project i have a restclient that uses mutiny:
I wanna handle propery non 2XX httpError so i have made my ExceptionMaper
a bad call on the client shows that MyExceptionMapper handle the response but the exception raises and does not became a failure on my Uni Client response object
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.4.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)maven
Additional information
No response
The text was updated successfully, but these errors were encountered: