Interface InvalidJsonInputError

All Superinterfaces:
ErrorObject

public interface InvalidJsonInputError extends 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 Details

    • INVALID_JSON_INPUT

      static final String INVALID_JSON_INPUT
      discriminator value for InvalidJsonInputError
      See Also:
  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: ErrorObject

      Error identifier.

      Specified by:
      getCode in interface ErrorObject
      Returns:
      code
    • getMessage

      @NotNull @NotNull String getMessage()

      "Request body does not contain valid JSON."

      Specified by:
      getMessage in interface ErrorObject
      Returns:
      message
    • getDetailedErrorMessage

      @NotNull @NotNull String getDetailedErrorMessage()

      Further explanation about why the JSON is invalid.

      Returns:
      detailedErrorMessage
    • setMessage

      void setMessage(String message)

      "Request body does not contain valid JSON."

      Specified by:
      setMessage in interface ErrorObject
      Parameters:
      message - value to be set
    • setDetailedErrorMessage

      void setDetailedErrorMessage(String detailedErrorMessage)

      Further explanation about why the JSON is invalid.

      Parameters:
      detailedErrorMessage - value to be set
    • of

      static InvalidJsonInputError 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

      static InvalidJsonInputErrorBuilder 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

      default <T> T withInvalidJsonInputError(Function<InvalidJsonInputError,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<InvalidJsonInputError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference