protected void errorIfStatusEqualTo ( ClientResponse response , ClientResponse . Status ... status ) throws ClientException { errorIf ( response , status , true ) ; }
If there is an unexpected status code this method gets the status message closes the response and throws an exception .