spring-framework / org.springframework.web.client / HttpClientErrorException

HttpClientErrorException

open class HttpClientErrorException : HttpStatusCodeException

Exception thrown when an HTTP 4xx is received.

Author
Arjen Poutsma

Since
3.0

See Also
DefaultResponseErrorHandler

Constructors

<init>

HttpClientErrorException(statusCode: HttpStatus)

Construct a new instance of HttpClientErrorException based on an HttpStatus.

HttpClientErrorException(statusCode: HttpStatus, statusText: String)

Construct a new instance of HttpClientErrorException based on an HttpStatus and status text.

HttpClientErrorException(statusCode: HttpStatus, statusText: String, responseBody: ByteArray, responseCharset: Charset)
HttpClientErrorException(statusCode: HttpStatus, statusText: String, responseHeaders: HttpHeaders, responseBody: ByteArray, responseCharset: Charset)

Construct a new instance of HttpClientErrorException based on an HttpStatus, status text, and response body content.