Interface InvalidCredentialsError

All Superinterfaces:
ErrorObject

public interface InvalidCredentialsError extends ErrorObject

Returned when a Customer with the given credentials (matching the given email/password pair) is not found and authentication fails.

The error is returned as a failed response to:

  • Authenticate (sign in) Customer and Authenticate (sign in) Customer in Store requests on Customers.
  • Authenticate (sign in) Customer and Authenticate (sign in) Customer in Store requests on My Customer Profile.

Example to create an instance using the builder pattern

     InvalidCredentialsError invalidCredentialsError = InvalidCredentialsError.builder()
             .message("{message}")
             .build()
 
  • Field Details

    • INVALID_CREDENTIALS

      static final String INVALID_CREDENTIALS
      discriminator value for InvalidCredentialsError
      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()

      "Account with the given credentials not found."

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

      void setMessage(String message)

      "Account with the given credentials not found."

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

      factory method
      Returns:
      instance of InvalidCredentialsError
    • of

      factory method to create a shallow copy InvalidCredentialsError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of InvalidCredentialsError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for InvalidCredentialsError
      Returns:
      builder
    • builder

      create builder for InvalidCredentialsError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withInvalidCredentialsError

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