Interface ExtensionBadResponseError
- All Superinterfaces:
ErrorObject
Returned when the response from the API Extension could not be parsed successfully (such as a 500
HTTP status code, or an invalid JSON response).
Example to create an instance using the builder pattern
ExtensionBadResponseError extensionBadResponseError = ExtensionBadResponseError.builder()
.message("{message}")
.plusExtensionErrors(extensionErrorsBuilder -> extensionErrorsBuilder)
.extensionId("{extensionId}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for ExtensionBadResponseError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for ExtensionBadResponseErrorbuilder
(ExtensionBadResponseError template) create builder for ExtensionBadResponseError instancestatic ExtensionBadResponseError
deepCopy
(ExtensionBadResponseError template) factory method to create a deep copy of ExtensionBadResponseError@NotNull String
getCode()
Error identifier.The response body returned by the Extension.@NotNull @Valid List<ExtensionError>
Additional errors related to the API Extension.@Valid Object
Any information that should be returned to the API caller.@NotNull String
Unique identifier of the Extension.User-defined unique identifier of the Extension.Http status code returned by the Extension.@Valid LocalizedString
User-defined localized description of the error.@NotNull String
Description of the invalid Extension response.static ExtensionBadResponseError
of()
factory methodstatic ExtensionBadResponseError
of
(ExtensionBadResponseError template) factory method to create a shallow copy ExtensionBadResponseErrorvoid
setExtensionBody
(String extensionBody) The response body returned by the Extension.void
setExtensionErrors
(ExtensionError... extensionErrors) Additional errors related to the API Extension.void
setExtensionErrors
(List<ExtensionError> extensionErrors) Additional errors related to the API Extension.void
setExtensionExtraInfo
(Object extensionExtraInfo) Any information that should be returned to the API caller.void
setExtensionId
(String extensionId) Unique identifier of the Extension.void
setExtensionKey
(String extensionKey) User-defined unique identifier of the Extension.void
setExtensionStatusCode
(Integer extensionStatusCode) Http status code returned by the Extension.void
setLocalizedMessage
(LocalizedString localizedMessage) User-defined localized description of the error.void
setMessage
(String message) Description of the invalid Extension response.static com.fasterxml.jackson.core.type.TypeReference<ExtensionBadResponseError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
EXTENSION_BAD_RESPONSE
discriminator value for ExtensionBadResponseError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
Description of the invalid Extension response. For example,
"The extension did not return the expected JSON."
.- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getLocalizedMessage
User-defined localized description of the error.
- Returns:
- localizedMessage
-
getExtensionExtraInfo
Any information that should be returned to the API caller.
- Returns:
- extensionExtraInfo
-
getExtensionErrors
Additional errors related to the API Extension.
- Returns:
- extensionErrors
-
getExtensionBody
String getExtensionBody()The response body returned by the Extension.
- Returns:
- extensionBody
-
getExtensionStatusCode
Integer getExtensionStatusCode()Http status code returned by the Extension.
- Returns:
- extensionStatusCode
-
getExtensionId
Unique identifier of the Extension.
- Returns:
- extensionId
-
getExtensionKey
String getExtensionKey()User-defined unique identifier of the Extension.
- Returns:
- extensionKey
-
setMessage
Description of the invalid Extension response. For example,
"The extension did not return the expected JSON."
.- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
setLocalizedMessage
User-defined localized description of the error.
- Parameters:
localizedMessage
- value to be set
-
setExtensionExtraInfo
Any information that should be returned to the API caller.
- Parameters:
extensionExtraInfo
- value to be set
-
setExtensionErrors
Additional errors related to the API Extension.
- Parameters:
extensionErrors
- values to be set
-
setExtensionErrors
Additional errors related to the API Extension.
- Parameters:
extensionErrors
- values to be set
-
setExtensionBody
The response body returned by the Extension.
- Parameters:
extensionBody
- value to be set
-
setExtensionStatusCode
Http status code returned by the Extension.
- Parameters:
extensionStatusCode
- value to be set
-
setExtensionId
Unique identifier of the Extension.
- Parameters:
extensionId
- value to be set
-
setExtensionKey
User-defined unique identifier of the Extension.
- Parameters:
extensionKey
- value to be set
-
of
factory method- Returns:
- instance of ExtensionBadResponseError
-
of
factory method to create a shallow copy ExtensionBadResponseError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ExtensionBadResponseError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ExtensionBadResponseError- Returns:
- builder
-
builder
create builder for ExtensionBadResponseError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withExtensionBadResponseError
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
-