Interface GeneralError
- All Superinterfaces:
ErrorObject
Returned when a server-side problem occurs before or after data persistence. In some cases, the requested action may successfully complete after the error is returned. Therefore, it is recommended to verify the status of the requested resource after receiving a 500 error.
If you encounter this error, report it to the Composable Commerce support team.
Example to create an instance using the builder pattern
GeneralError generalError = GeneralError.builder()
.message("{message}")
.build()
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic GeneralErrorBuilderbuilder()builder factory method for GeneralErrorstatic GeneralErrorBuilderbuilder(GeneralError template) create builder for GeneralError instancecopyDeep()static GeneralErrordeepCopy(GeneralError template) factory method to create a deep copy of GeneralError@NotNull StringgetCode()Error identifier.@NotNull StringDescription about any known details of the problem, for example,"Write operations are temporarily unavailable".static GeneralErrorof()factory methodstatic GeneralErrorof(GeneralError template) factory method to create a shallow copy GeneralErrorvoidsetMessage(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> TwithGeneralError(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:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
Description about any known details of the problem, for example,
"Write operations are temporarily unavailable".- Specified by:
getMessagein interfaceErrorObject- Returns:
- message
-
setMessage
Description about any known details of the problem, for example,
"Write operations are temporarily unavailable".- Specified by:
setMessagein 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
-
copyDeep
GeneralError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
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
-