public class HttpClientErrorException extends HttpStatusCodeException
DefaultResponseErrorHandler
,
Serialized FormConstructor and Description |
---|
HttpClientErrorException(HttpStatus statusCode)
Constructor with a status code only.
|
HttpClientErrorException(HttpStatus statusCode,
String statusText)
Constructor with a status code and status text.
|
HttpClientErrorException(HttpStatus statusCode,
String statusText,
byte[] body,
Charset responseCharset)
Constructor with a status code and status text, and content.
|
HttpClientErrorException(HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset responseCharset)
Constructor with a status code and status text, headers, and content.
|
Modifier and Type | Method and Description |
---|---|
static HttpClientErrorException |
create(HttpStatus statusCode,
String statusText,
HttpHeaders headers,
byte[] body,
Charset charset)
Create
HttpClientErrorException or an HTTP status specific sub-class. |
getStatusCode
getRawStatusCode, getResponseBodyAsByteArray, getResponseBodyAsString, getResponseHeaders, getStatusText
contains, getMessage, getMostSpecificCause, getRootCause
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public HttpClientErrorException(HttpStatus statusCode)
public HttpClientErrorException(HttpStatus statusCode, String statusText)
public HttpClientErrorException(HttpStatus statusCode, String statusText, @Nullable byte[] body, @Nullable Charset responseCharset)
public HttpClientErrorException(HttpStatus statusCode, String statusText, @Nullable HttpHeaders headers, @Nullable byte[] body, @Nullable Charset responseCharset)
public static HttpClientErrorException create(HttpStatus statusCode, String statusText, HttpHeaders headers, byte[] body, @Nullable Charset charset)
HttpClientErrorException
or an HTTP status specific sub-class.