Class HttpClientErrorException
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.HttpStatusCodeException
org.springframework.web.client.HttpClientErrorException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
HttpClientErrorException.BadRequest, HttpClientErrorException.Conflict, HttpClientErrorException.Forbidden, HttpClientErrorException.Gone, HttpClientErrorException.MethodNotAllowed, HttpClientErrorException.NotAcceptable, HttpClientErrorException.NotFound, HttpClientErrorException.TooManyRequests, HttpClientErrorException.Unauthorized, HttpClientErrorException.UnprocessableContent, HttpClientErrorException.UnprocessableEntity, HttpClientErrorException.UnsupportedMediaType
Exception thrown when an HTTP 4xx is received.
- Since:
- 3.0
- Author:
- Arjen Poutsma, Sebastien Deleuze
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classHttpClientErrorExceptionfor status HTTP 400 Bad Request.static final classHttpClientErrorExceptionfor status HTTP 409 Conflict.static final classHttpClientErrorExceptionfor status HTTP 403 Forbidden.static final classHttpClientErrorExceptionfor status HTTP 410 Gone.static final classHttpClientErrorExceptionfor status HTTP 405 Method Not Allowed.static final classHttpClientErrorExceptionfor status HTTP 406 Not Acceptable.static final classHttpClientErrorExceptionfor status HTTP 404 Not Found.static final classHttpClientErrorExceptionfor status HTTP 429 Too Many Requests.static final classHttpClientErrorExceptionfor status HTTP 401 Unauthorized.static final classHttpClientErrorExceptionfor status HTTP 422 Unprocessable Content.static final classDeprecated.static final classHttpClientErrorExceptionfor status HTTP 415 Unsupported Media Type. -
Constructor Summary
ConstructorsConstructorDescriptionHttpClientErrorException(String message, HttpStatusCode statusCode, String statusText, @Nullable HttpHeaders headers, byte @Nullable [] body, @Nullable Charset responseCharset) Constructor with a status code and status text, headers, and content, and a prepared message.HttpClientErrorException(HttpStatusCode statusCode) Constructor with a status code only.HttpClientErrorException(HttpStatusCode statusCode, String statusText) Constructor with a status code and status text.HttpClientErrorException(HttpStatusCode statusCode, String statusText, byte @Nullable [] body, @Nullable Charset responseCharset) Constructor with a status code and status text, and content.HttpClientErrorException(HttpStatusCode statusCode, String statusText, @Nullable HttpHeaders headers, byte @Nullable [] body, @Nullable Charset responseCharset) Constructor with a status code and status text, headers, and content. -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpClientErrorExceptioncreate(@Nullable String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte @Nullable [] body, @Nullable Charset charset) Variant ofcreate(HttpStatusCode, String, HttpHeaders, byte[], Charset)with an optional prepared message.static
HttpClientErrorException.UnprocessableContent