Interface BadGatewayError
- All Superinterfaces:
ErrorObject
Returned when a server-side problem is caused by scaling infrastructure resources.
The client application should retry the request with exponential backoff up to a point where further delay is unacceptable.
Example to create an instance using the builder pattern
BadGatewayError badGatewayError = BadGatewayError.builder()
.message("{message}")
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic BadGatewayErrorBuilder
builder()
builder factory method for BadGatewayErrorstatic BadGatewayErrorBuilder
builder
(BadGatewayError template) create builder for BadGatewayError instancestatic BadGatewayError
deepCopy
(BadGatewayError template) factory method to create a deep copy of BadGatewayError@NotNull String
getCode()
Error identifier.@NotNull String
Plain text description of the error.static BadGatewayError
of()
factory methodstatic BadGatewayError
of
(BadGatewayError template) factory method to create a shallow copy BadGatewayErrorvoid
setMessage
(String message) Plain text description of the error.static com.fasterxml.jackson.core.type.TypeReference<BadGatewayError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withBadGatewayError
(Function<BadGatewayError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
BAD_GATEWAY
discriminator value for BadGatewayError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
Plain text description of the error.
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
setMessage
Plain text description of the error.
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
of
factory method- Returns:
- instance of BadGatewayError
-
of
factory method to create a shallow copy BadGatewayError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of BadGatewayError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for BadGatewayError- Returns:
- builder
-
builder
create builder for BadGatewayError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withBadGatewayError
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-