Top Description Inners Fields Constructors Methods
org.springframework.web.client

public Class HttpServerErrorException

extends HttpStatusCodeException
Class Inheritance
Known Direct Subclasses
org.springframework.web.client.HttpServerErrorException.InternalServerError, org.springframework.web.client.HttpServerErrorException.NotImplemented, org.springframework.web.client.HttpServerErrorException.BadGateway, org.springframework.web.client.HttpServerErrorException.ServiceUnavailable, org.springframework.web.client.HttpServerErrorException.GatewayTimeout
Imports
java.nio.charset.Charset, org.springframework.http.HttpHeaders, .HttpStatus, .HttpStatusCode, org.springframework.lang.Nullable

Exception thrown when an HTTP 5xx is received.
Author
Arjen Poutsma
Since
3.0
See Also
DefaultResponseErrorHandler

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
HttpServerErrorException(HttpStatusCode statusCode)

Constructor with a status code only.

public
HttpServerErrorException(HttpStatusCode statusCode, String statusText)

Constructor with a status code and status text.

public
HttpServerErrorException(HttpStatusCode statusCode, String statusText, byte[] body, Charset charset)

Constructor with a status code and status text, and content.

public
HttpServerErrorException(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)

Constructor with a status code and status text, headers, and content.

public
HttpServerErrorException(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)

Constructor with a status code and status text, headers, content, and a prepared message.

Method Summary

Modifier and TypeMethod and Description
public static HttpServerErrorException
create(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)

Create an HttpServerErrorException or an HTTP status specific subclass.

public static HttpServerErrorException
create(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)

Variant of create(String, HttpStatusCode, String, HttpHeaders, byte[], Charset) with an optional prepared message.

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides org.springframework.web.client.HttpStatusCodeException.serialVersionUID.

Constructor Detail

HttpServerErrorExceptionback to summary
public HttpServerErrorException(HttpStatusCode statusCode)

Constructor with a status code only.

HttpServerErrorExceptionback to summary
public HttpServerErrorException(HttpStatusCode statusCode, String statusText)

Constructor with a status code and status text.

HttpServerErrorExceptionback to summary
public HttpServerErrorException(HttpStatusCode statusCode, String statusText, byte[] body, Charset charset)

Constructor with a status code and status text, and content.

HttpServerErrorExceptionback to summary
public HttpServerErrorException(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)

Constructor with a status code and status text, headers, and content.

HttpServerErrorExceptionback to summary
public HttpServerErrorException(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)

Constructor with a status code and status text, headers, content, and a prepared message.

Since
5.2.2

Method Detail

createback to summary
public static HttpServerErrorException create(HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)

Create an HttpServerErrorException or an HTTP status specific subclass.

Since
5.1
createback to summary
public static HttpServerErrorException create(String message, HttpStatusCode statusCode, String statusText, HttpHeaders headers, byte[] body, Charset charset)

Variant of create(String, HttpStatusCode, String, HttpHeaders, byte[], Charset) with an optional prepared message.

Since
5.2.2.
org.springframework.web.client back to summary

public final Class HttpServerErrorException.BadGateway

extends HttpServerErrorException
Class Inheritance
Annotations
@SuppressWarnings:serial

HttpServerErrorException for HTTP status 502 Bad Gateway.
Since
5.1

Constructor Summary

AccessConstructor and Description
private
BadGateway(String statusText, HttpHeaders headers, byte[] body, Charset charset)

private
BadGateway(String message, String statusText, HttpHeaders headers, byte[] body, Charset charset)

Method Summary

Inherited from org.springframework.web.client.HttpServerErrorException:
createcreate

Constructor Detail

BadGatewayback to summary
private BadGateway(String statusText, HttpHeaders headers, byte[] body, Charset charset)
BadGatewayback to summary
private BadGateway(String message, String statusText, HttpHeaders headers, byte[] body, Charset charset)
org.springframework.web.client back to summary

public final Class HttpServerErrorException.GatewayTimeout

extends HttpServerErrorException
Class Inheritance
Annotations
@SuppressWarnings:serial

HttpServerErrorException for status HTTP 504 Gateway Timeout.
Since
5.1

Constructor Summary

AccessConstructor and Description
private
GatewayTimeout(String statusText, HttpHeaders headers, byte[] body, Charset charset)

private
GatewayTimeout(String message, String statusText, HttpHeaders headers, byte[] body, Charset charset)

Method Summary

Inherited from org.springframework.web.client.HttpServerErrorException:
createcreate

Constructor Detail

GatewayTimeoutback to summary
private GatewayTimeout(String statusText, HttpHeaders headers, byte[] body, Charset charset)
GatewayTimeoutback to summary
private GatewayTimeout(String message, String statusText, HttpHeaders headers, byte[] body, Charset charset)
org.springframework.web.client back to summary

public final Class HttpServerErrorException.InternalServerError

extends HttpServerErrorException
Class Inheritance
Annotations
@SuppressWarnings:serial

HttpServerErrorException for status HTTP 500 Internal Server Error.
Since
5.1

Constructor Summary

AccessConstructor and Description
private
InternalServerError(String statusText, HttpHeaders headers, byte[] body, Charset charset)

private
InternalServerError(String message, String statusText, HttpHeaders headers, byte[] body, Charset charset)

Method Summary

Inherited from org.springframework.web.client.HttpServerErrorException:
createcreate

Constructor Detail

InternalServerErrorback to summary
private InternalServerError(String statusText, HttpHeaders headers, byte[] body, Charset charset)
InternalServerErrorback to summary
private InternalServerError(String message, String statusText, HttpHeaders headers, byte[] body, Charset charset)
org.springframework.web.client back to summary

public final Class HttpServerErrorException.NotImplemented

extends HttpServerErrorException
Class Inheritance
Annotations
@SuppressWarnings:serial

HttpServerErrorException for status HTTP 501 Not Implemented.
Since
5.1

Constructor Summary

AccessConstructor and Description
private
NotImplemented(String statusText, HttpHeaders headers, byte[] body, Charset charset)

private
NotImplemented(String message, String statusText, HttpHeaders headers, byte[] body, Charset charset)

Method Summary

Inherited from org.springframework.web.client.HttpServerErrorException:
createcreate

Constructor Detail

NotImplementedback to summary
private NotImplemented(String statusText, HttpHeaders headers, byte[] body, Charset charset)
NotImplementedback to summary
private NotImplemented(String message, String statusText, HttpHeaders headers, byte[] body, Charset charset)
org.springframework.web.client back to summary

public final Class HttpServerErrorException.ServiceUnavailable

extends HttpServerErrorException
Class Inheritance
Annotations
@SuppressWarnings:serial

HttpServerErrorException for status HTTP 503 Service Unavailable.
Since
5.1

Constructor Summary

AccessConstructor and Description
private
ServiceUnavailable(String statusText, HttpHeaders headers, byte[] body, Charset charset)

private
ServiceUnavailable(String message, String statusText, HttpHeaders headers, byte[] body, Charset charset)

Method Summary

Inherited from org.springframework.web.client.HttpServerErrorException:
createcreate

Constructor Detail

ServiceUnavailableback to summary
private ServiceUnavailable(String statusText, HttpHeaders headers, byte[] body, Charset charset)
ServiceUnavailableback to summary
private ServiceUnavailable(String message, String statusText, HttpHeaders headers, byte[] body, Charset charset)