-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Resteasy Reactive: ServerExceptionMapper
does not process a thrown Exception
(Kotlin only)
#20357
Comments
I can't reproduce this problem with the snippets included in the description. Please attach a project that exhibits this behavior (ideally with failing tests). |
I've made a reproducer (see attached), including some tests. Please note that unfortunately the tests do not fail. The problem can only be reproduced in dev mode. Run 2021-09-23 16:01:39,381 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (executor-thread-0) HTTP Request to /ex/throw1 failed, error id: 4c3eb23b-e454-43fb-9c2c-96d44e308b1f-1: io.quarkus.arc.ArcUndeclaredThrowableException: Error invoking subclass method
at org.acme.ExceptionTestResource_Subclass.throwException1Method(ExceptionTestResource_Subclass.zig:205)
at org.acme.ExceptionTestResource_ClientProxy.throwException1Method(ExceptionTestResource_ClientProxy.zig:185)
at org.acme.ExceptionTestResource$quarkusrestinvoker$throwException1Method_4a04d16e4f5785de322606c51c7fc425b79facd0.invoke(ExceptionTestResource$quarkusrestinvoker$throwException1Method_4a04d16e4f5785de322606c51c7fc425b79facd0.zig:33)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:7)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:141)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$13.runWith(VertxCoreRecorder.java:543)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.acme.MyException
at org.acme.ExceptionTestResource.throwException1Method(ExceptionTestResource.kt:30)
at org.acme.ExceptionTestResource_Subclass.throwException1Method$$superforward1(ExceptionTestResource_Subclass.zig:113)
at org.acme.ExceptionTestResource_Subclass$$function$$1.apply(ExceptionTestResource_Subclass$$function$$1.zig:24)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java:62)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:49)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(InvocationInterceptor_Bean.zig:521)
at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
at org.acme.ExceptionTestResource_Subclass.throwException1Method(ExceptionTestResource_Subclass.zig:183)
... 12 more
2021-09-23 16:01:39,390 ERROR [org.jbo.res.rea.com.cor.AbstractResteasyReactiveContext] (executor-thread-0) Request failed: io.quarkus.arc.ArcUndeclaredThrowableException: Error invoking subclass method
at org.acme.ExceptionTestResource_Subclass.throwException1Method(ExceptionTestResource_Subclass.zig:205)
at org.acme.ExceptionTestResource_ClientProxy.throwException1Method(ExceptionTestResource_ClientProxy.zig:185)
at org.acme.ExceptionTestResource$quarkusrestinvoker$throwException1Method_4a04d16e4f5785de322606c51c7fc425b79facd0.invoke(ExceptionTestResource$quarkusrestinvoker$throwException1Method_4a04d16e4f5785de322606c51c7fc425b79facd0.zig:33)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:29)
at org.jboss.resteasy.reactive.server.handlers.InvocationHandler.handle(InvocationHandler.java:7)
at org.jboss.resteasy.reactive.common.core.AbstractResteasyReactiveContext.run(AbstractResteasyReactiveContext.java:141)
at io.quarkus.vertx.core.runtime.VertxCoreRecorder$13.runWith(VertxCoreRecorder.java:543)
at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:29)
at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:29)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: org.acme.MyException
at org.acme.ExceptionTestResource.throwException1Method(ExceptionTestResource.kt:30)
at org.acme.ExceptionTestResource_Subclass.throwException1Method$$superforward1(ExceptionTestResource_Subclass.zig:113)
at org.acme.ExceptionTestResource_Subclass$$function$$1.apply(ExceptionTestResource_Subclass$$function$$1.zig:24)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.proceed(AroundInvokeInvocationContext.java:54)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.proceed(InvocationInterceptor.java:62)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor.monitor(InvocationInterceptor.java:49)
at io.quarkus.arc.runtime.devconsole.InvocationInterceptor_Bean.intercept(InvocationInterceptor_Bean.zig:521)
at io.quarkus.arc.impl.InterceptorInvocation.invoke(InterceptorInvocation.java:41)
at io.quarkus.arc.impl.AroundInvokeInvocationContext.perform(AroundInvokeInvocationContext.java:41)
at io.quarkus.arc.impl.InvocationContexts.performAroundInvoke(InvocationContexts.java:32)
at org.acme.ExceptionTestResource_Subclass.throwException1Method(ExceptionTestResource_Subclass.zig:183)
... 12 more |
#20364 takes care of the issue |
Add the exception unwrapping capabilities to RESTEasy Reactive
Fixes: quarkusio#20357 (cherry picked from commit 538b3b7)
Describe the bug
If a (Kotlin-)Rest-Endpoint throws an
java.lang.Exception
then theException
does not get processed by a customServerExceptionMapper
.RuntimeException
works as excepted.Expected behavior
No response
Actual behavior
No response
How to Reproduce?
Output of
uname -a
orver
No response
Output of
java -version
Java 11
GraalVM version (if different from Java)
No response
Quarkus version or git rev
Quarkus 2.2.3.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven 3.8.1
Additional information
No response
The text was updated successfully, but these errors were encountered: