public class HttpClientErrorException extends HttpStatusCodeException
DefaultResponseErrorHandler
,
Serialized FormConstructor and Description |
---|
HttpClientErrorException(HttpStatus statusCode)
Construct a new instance of
HttpClientErrorException based on
an HttpStatus . |
HttpClientErrorException(HttpStatus statusCode,
String statusText)
Construct a new instance of
HttpClientErrorException based on
an HttpStatus and status text. |
HttpClientErrorException(HttpStatus statusCode,
String statusText,
byte[] responseBody,
Charset responseCharset)
Construct a new instance of
HttpClientErrorException based on
an HttpStatus , status text, and response body content. |
HttpClientErrorException(HttpStatus statusCode,
String statusText,
HttpHeaders responseHeaders,
byte[] responseBody,
Charset responseCharset)
Construct a new instance of
HttpClientErrorException based on
an HttpStatus , status text, and response body content. |
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)
HttpClientErrorException
based on
an HttpStatus
.statusCode
- the status codepublic HttpClientErrorException(HttpStatus statusCode, String statusText)
HttpClientErrorException
based on
an HttpStatus
and status text.statusCode
- the status codestatusText
- the status textpublic HttpClientErrorException(HttpStatus statusCode, String statusText, @Nullable byte[] responseBody, @Nullable Charset responseCharset)
HttpClientErrorException
based on
an HttpStatus
, status text, and response body content.statusCode
- the status codestatusText
- the status textresponseBody
- the response body content (may be null
)responseCharset
- the response body charset (may be null
)public HttpClientErrorException(HttpStatus statusCode, String statusText, @Nullable HttpHeaders responseHeaders, @Nullable byte[] responseBody, @Nullable Charset responseCharset)
HttpClientErrorException
based on
an HttpStatus
, status text, and response body content.statusCode
- the status codestatusText
- the status textresponseHeaders
- the response headers (may be null
)responseBody
- the response body content (may be null
)responseCharset
- the response body charset (may be null
)