Package org.springframework.web.client
Class UnknownHttpStatusCodeException
- 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.RestClientResponseException
- org.springframework.web.client.UnknownHttpStatusCodeException
- All Implemented Interfaces:
Serializable
public class UnknownHttpStatusCodeException extends RestClientResponseException
Exception thrown when an unknown (or custom) HTTP status code is received.- Since:
- 3.2
- Author:
- Rossen Stoyanchev
- See Also:
- Serialized Form
Constructor Summary
Constructors Constructor Description UnknownHttpStatusCodeException(int rawStatusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset)
Construct a new instance ofHttpStatusCodeException
based on anHttpStatus
, status text, and response body content.
Method Summary
Methods inherited from class org.springframework.web.client.RestClientResponseException
getRawStatusCode, getResponseBodyAsByteArray, getResponseBodyAsString, getResponseHeaders, getStatusText
Methods inherited from class org.springframework.core.NestedRuntimeException
contains, getMessage, getMostSpecificCause, getRootCause
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Constructor Detail
UnknownHttpStatusCodeException
public UnknownHttpStatusCodeException(int rawStatusCode, String statusText, HttpHeaders responseHeaders, byte[] responseBody, Charset responseCharset)
Construct a new instance ofHttpStatusCodeException
based on anHttpStatus
, status text, and response body content.- Parameters:
rawStatusCode
- the raw status code valuestatusText
- the status textresponseHeaders
- the response headers (may benull
)responseBody
- the response body content (may benull
)responseCharset
- the response body charset (may benull
)