Skip to Content

CustomerErrorCode

Possible error codes that can be returned by customer mutations. These errors help developers understand what went wrong during customer authentication, registration, or account operations.

Enum Definition

enum CustomerErrorCode { INVALID_CREDENTIALS UNIDENTIFIED_CUSTOMER TOKEN_EXPIRED TOKEN_INVALID TOO_MANY_ATTEMPTS EMAIL_TAKEN INVALID_EMAIL INVALID_PASSWORD PASSWORD_MISMATCH LOGIN_DISABLED REGISTRATION_DISABLED BLANK }

Values

ValueDescription
INVALID_CREDENTIALSThe email or password is incorrect
UNIDENTIFIED_CUSTOMERThe customer could not be identified
TOKEN_EXPIREDThe access token has expired
TOKEN_INVALIDThe access token is invalid
TOO_MANY_ATTEMPTSToo many login attempts. Please try again later.
EMAIL_TAKENThe email address is already registered
INVALID_EMAILThe email address is invalid
INVALID_PASSWORDThe password does not meet requirements
PASSWORD_MISMATCHThe password and password confirmation do not match
LOGIN_DISABLEDCustomer login is disabled for this store
REGISTRATION_DISABLEDCustomer registration is disabled for this store
BLANKA required field is blank

Example

mutation LoginCustomer { customerLogin(email: "user@example.com", password: "password123") { customer { id email } errors { code message } } }

In this example, if the login fails, the errors field may contain a code value of type CustomerErrorCode, such as INVALID_CREDENTIALS or TOO_MANY_ATTEMPTS.

  • Customer
  • CustomerMutation
  • CustomerError