Details
-
Bug
-
Resolution: Done
-
Major
-
3.5.0.Final
-
None
Description
Scenario
I'm using the Microprofile Restclient on WildFly 12.0.0.Final.
My application registers a ResponseExceptionMapper<RuntimeException> with default priority which will take precedence over the DefaultResponseExceptionMapper.
I'm invoking a client method for which the server responds with HTTP status 400.
Expected Behaviour
The Restclient throws a RuntimeException produced by my mapper.
Actual Behaviour
The Restclient throws a ClassCastException:
Caused by: java.lang.ClassCastException: java.lang.RuntimeException cannot be cast to javax.ws.rs.WebApplicationException at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.filterResponse(ClientInvocation.java:648) at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:442) at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:102) at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:76)