Interface GeneralError
- All Superinterfaces:
ErrorObject
- All Known Implementing Classes:
GeneralErrorImpl
Returned when a server-side problem occurs.
If you encounter this error, report it using the Support Portal.
Example to create an instance using the builder pattern
GeneralError generalError = GeneralError.builder()
.message("{message}")
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic GeneralErrorBuilder
builder()
builder factory method for GeneralErrorstatic GeneralErrorBuilder
builder
(GeneralError template) create builder for GeneralError instancestatic GeneralError
deepCopy
(GeneralError template) factory method to create a deep copy of GeneralError@NotNull String
getCode()
Error identifier.@NotNull String
Description about any known details of the problem, for example,"Write operations are temporarily unavailable"
.static GeneralError
of()
factory methodstatic GeneralError
of
(GeneralError template) factory method to create a shallow copy GeneralErrorvoid
setMessage
(String message) Description about any known details of the problem, for example,"Write operations are temporarily unavailable"
.static com.fasterxml.jackson.core.type.TypeReference<GeneralError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withGeneralError
(Function<GeneralError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
GENERAL
discriminator value for GeneralError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
Description about any known details of the problem, for example,
"Write operations are temporarily unavailable"
.- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
setMessage
Description about any known details of the problem, for example,
"Write operations are temporarily unavailable"
.- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
of
factory method- Returns:
- instance of GeneralError
-
of
factory method to create a shallow copy GeneralError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of GeneralError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for GeneralError- Returns:
- builder
-
builder
create builder for GeneralError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withGeneralError
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
-