public class

HttpClientErrorException

extends HttpStatusCodeException
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ org.springframework.core.NestedRuntimeException
           ↳ org.springframework.web.client.RestClientException
             ↳ org.springframework.web.client.HttpStatusCodeException
               ↳ org.springframework.web.client.HttpClientErrorException

Class Overview

Exception thrown when an HTTP 4xx is received.

Summary

Public Constructors
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.
HttpClientErrorException(HttpStatus statusCode, String statusText, byte[] responseBody, Charset responseCharset)
Construct a new instance of HttpClientErrorException based on a HttpStatus, status text, and response body content.
[Expand]
Inherited Methods
From class org.springframework.web.client.HttpStatusCodeException
From class org.springframework.core.NestedRuntimeException
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public HttpClientErrorException (HttpStatus statusCode)

Construct a new instance of HttpClientErrorException based on a HttpStatus.

Parameters
statusCode the status code

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

public HttpClientErrorException (HttpStatus statusCode, String statusText, byte[] responseBody, Charset responseCharset)

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

Parameters
statusCode the status code
statusText the status text
responseBody the response body content, may be null
responseCharset the response body charset, may be null