Interface GeneralError

All Superinterfaces:
ErrorObject

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

  • 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()

      Description about any known details of the problem, for example, "Write operations are temporarily unavailable".

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

      void setMessage(String message)

      Description about any known details of the problem, for example, "Write operations are temporarily unavailable".

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

      static GeneralError of()
      factory method
      Returns:
      instance of GeneralError
    • of

      static GeneralError of(GeneralError template)
      factory method to create a shallow copy GeneralError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static GeneralError deepCopy(@Nullable GeneralError template)
      factory method to create a deep copy of GeneralError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static GeneralErrorBuilder builder()
      builder factory method for GeneralError
      Returns:
      builder
    • builder

      static GeneralErrorBuilder builder(GeneralError template)
      create builder for GeneralError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withGeneralError

      default <T> T withGeneralError(Function<GeneralError,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<GeneralError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference