Example: specific errors with ClientErrorInterceptor
public class ExampleInterceptor implements ClientErrorInterceptor { public void handle(ClientResponse response) throws RuntimeException { try { BaseClientResponse r = (BaseClientResponse) response; InputStream stream = r.getStreamFactory().getInputStream(); stream.reset(); String data = response.getEntity(String.class); if(FORBIDDEN.equals(response.getResponseStatus())) { throw new MyCustomException("This exception will be thrown " + "instead of the ClientResponseFailure"); } } catch (IOException e) { //... } // If we got here, and this method returns successfully, // RESTEasy will throw the original ClientResponseFailure } }