org.springframework.web.client
Class HttpClientErrorException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.springframework.core.NestedRuntimeException
                  extended by org.springframework.web.client.RestClientException
                      extended by org.springframework.web.client.HttpStatusCodeException
                          extended by org.springframework.web.client.HttpClientErrorException
All Implemented Interfaces:
Serializable

public class HttpClientErrorException
extends HttpStatusCodeException

Exception thrown when an HTTP 4xx is received.

Since:
3.0
Author:
Arjen Poutsma
See Also:
DefaultResponseErrorHandler, Serialized Form

Constructor Summary
HttpClientErrorException(HttpStatus statusCode)
          Construct a new instance of HttpClientErrorException based on a HttpStatus.
HttpClientErrorException(HttpStatus statusCode, String statusText)
          Construct a new instance of HttpClientErrorException based on a HttpStatus and status text.
 
Method Summary
 
Methods inherited from class org.springframework.web.client.HttpStatusCodeException
getStatusCode, getStatusText
 
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HttpClientErrorException

public HttpClientErrorException(HttpStatus statusCode)
Construct a new instance of HttpClientErrorException based on a HttpStatus.

Parameters:
statusCode - the status code

HttpClientErrorException

public HttpClientErrorException(HttpStatus statusCode,
                                String statusText)
Construct a new instance of HttpClientErrorException based on a HttpStatus and status text.

Parameters:
statusCode - the status code
statusText - the status text