Throwable cause = rpe.getCause(); if (cause instanceof RuntimeException)
@Override public Response toResponse(ResponseProcessingException exception) { ClientErrorException clientErrorException = (ClientErrorException) exception.getCause(); return clientErrorException.getResponse(); } }
protected Object interceptorChainCompleted() throws Exception { try { return method.invoke(target, args); } catch (InvocationTargetException e) { if (e.getCause() instanceof ResponseProcessingException) { ResponseProcessingException rpe = (ResponseProcessingException) e.getCause(); // Note that the default client engine leverages a single connection // MP FT: we need to close the response otherwise we would not be able to retry if the method returns javax.ws.rs.core.Response rpe.getResponse().close(); Throwable cause = rpe.getCause(); if (cause instanceof RuntimeException) { throw (RuntimeException) cause; } } throw e; } }
protected Object interceptorChainCompleted() throws Exception { try { return method.invoke(target, args); } catch (InvocationTargetException e) { if (e.getCause() instanceof ResponseProcessingException) { ResponseProcessingException rpe = (ResponseProcessingException) e.getCause(); // Note that the default client engine leverages a single connection // MP FT: we need to close the response otherwise we would not be able to retry if the method returns javax.ws.rs.core.Response rpe.getResponse().close(); Throwable cause = rpe.getCause(); if (cause instanceof RuntimeException) { throw (RuntimeException) cause; } } throw e; } }
Throwable cause = rpe.getCause(); if (cause instanceof RuntimeException)
if (e.getCause() instanceof ResponseProcessingException) { ResponseProcessingException rpe = (ResponseProcessingException) e.getCause(); Throwable cause = rpe.getCause(); if (cause instanceof RuntimeException) { throw cause;
if (e.getCause() instanceof ResponseProcessingException) { ResponseProcessingException rpe = (ResponseProcessingException) e.getCause(); Throwable cause = rpe.getCause(); if (cause instanceof RuntimeException) { throw cause;