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
Modifier and TypeFieldDescriptionstatic final String
discriminator value for InvalidJsonInputError -
Method Summary
Modifier and TypeMethodDescriptionstatic InvalidJsonInputErrorBuilder
builder()
builder factory method for InvalidJsonInputErrorstatic InvalidJsonInputErrorBuilder
builder
(InvalidJsonInputError template) create builder for InvalidJsonInputError instancestatic InvalidJsonInputError
deepCopy
(InvalidJsonInputError template) factory method to create a deep copy of InvalidJsonInputError@NotNull String
getCode()
Error identifier.@NotNull String
Further explanation about why the JSON is invalid.@NotNull String
"Request body does not contain valid JSON."
static InvalidJsonInputError
of()
factory methodstatic InvalidJsonInputError
of
(InvalidJsonInputError template) factory method to create a shallow copy InvalidJsonInputErrorvoid
setDetailedErrorMessage
(String detailedErrorMessage) Further explanation about why the JSON is invalid.void
setMessage
(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> T
accessor 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:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"Request body does not contain valid JSON."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
getDetailedErrorMessage
Further explanation about why the JSON is invalid.
- Returns:
- detailedErrorMessage
-
setMessage
"Request body does not contain valid JSON."
- Specified by:
setMessage
in 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
-
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
-