Interface InvalidJsonInputError
- All Superinterfaces:
ErrorObject
Returned when an invalid JSON input has been sent. Either the JSON is syntactically incorrect or does not conform to the expected shape (for example is missing a required field).
The client application should validate the input according to the constraints described in the error message before sending the request.
Example to create an instance using the builder pattern
InvalidJsonInputError invalidJsonInputError = InvalidJsonInputError.builder()
.message("{message}")
.detailedErrorMessage("{detailedErrorMessage}")
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for InvalidJsonInputError -
Method Summary
Modifier and TypeMethodDescriptionstatic InvalidJsonInputErrorBuilderbuilder()builder factory method for InvalidJsonInputErrorstatic InvalidJsonInputErrorBuilderbuilder(InvalidJsonInputError template) create builder for InvalidJsonInputError instancecopyDeep()static InvalidJsonInputErrordeepCopy(InvalidJsonInputError template) factory method to create a deep copy of InvalidJsonInputError@NotNull StringgetCode()Error identifier.@NotNull StringFurther explanation about why the JSON is invalid.@NotNull String"Request body does not contain valid JSON."static InvalidJsonInputErrorof()factory methodstatic InvalidJsonInputErrorof(InvalidJsonInputError template) factory method to create a shallow copy InvalidJsonInputErrorvoidsetDetailedErrorMessage(String detailedErrorMessage) Further explanation about why the JSON is invalid.voidsetMessage(String message) "Request body does not contain valid JSON."static com.fasterxml.jackson.core.type.TypeReference<InvalidJsonInputError>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
INVALID_JSON_INPUT
discriminator value for InvalidJsonInputError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"Request body does not contain valid JSON."- Specified by:
getMessagein interfaceErrorObject- Returns:
- message
-
getDetailedErrorMessage
Further explanation about why the JSON is invalid.
- Returns:
- detailedErrorMessage
-
setMessage
"Request body does not contain valid JSON."- Specified by:
setMessagein interfaceErrorObject- Parameters:
message- value to be set
-
setDetailedErrorMessage
Further explanation about why the JSON is invalid.
- Parameters:
detailedErrorMessage- value to be set
-
of
factory method- Returns:
- instance of InvalidJsonInputError
-
of
factory method to create a shallow copy InvalidJsonInputError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
InvalidJsonInputError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
deepCopy
factory method to create a deep copy of InvalidJsonInputError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for InvalidJsonInputError- Returns:
- builder
-
builder
create builder for InvalidJsonInputError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withInvalidJsonInputError
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
-