public class HttpServerErrorException extends HttpStatusCodeException
DefaultResponseErrorHandler
,
Serialized FormConstructor and Description |
---|
HttpServerErrorException(HttpStatus statusCode)
Construct a new instance of
HttpServerErrorException based on
an HttpStatus . |
HttpServerErrorException(HttpStatus statusCode,
java.lang.String statusText)
Construct a new instance of
HttpServerErrorException based on
an HttpStatus and status text. |
HttpServerErrorException(HttpStatus statusCode,
java.lang.String statusText,
byte[] responseBody,
java.nio.charset.Charset responseCharset)
Construct a new instance of
HttpServerErrorException based on
an HttpStatus , status text, and response body content. |
HttpServerErrorException(HttpStatus statusCode,
java.lang.String statusText,
HttpHeaders responseHeaders,
byte[] responseBody,
java.nio.charset.Charset responseCharset)
Construct a new instance of
HttpServerErrorException based on
an HttpStatus , status text, and response body content. |
getStatusCode
getRawStatusCode, getResponseBodyAsByteArray, getResponseBodyAsString, getResponseHeaders, getStatusText
contains, getMessage, getMostSpecificCause, getRootCause
public HttpServerErrorException(HttpStatus statusCode)
HttpServerErrorException
based on
an HttpStatus
.statusCode
- the status codepublic HttpServerErrorException(HttpStatus statusCode, java.lang.String statusText)
HttpServerErrorException
based on
an HttpStatus
and status text.statusCode
- the status codestatusText
- the status textpublic HttpServerErrorException(HttpStatus statusCode, java.lang.String statusText, @Nullable byte[] responseBody, @Nullable java.nio.charset.Charset responseCharset)
HttpServerErrorException
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 HttpServerErrorException(HttpStatus statusCode, java.lang.String statusText, @Nullable HttpHeaders responseHeaders, @Nullable byte[] responseBody, @Nullable java.nio.charset.Charset responseCharset)
HttpServerErrorException
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
)