Options
All
  • Public
  • Public/Protected
  • All
Menu

Base error class for all authentication-related errors in the APIs that can be used both server and client-side. If you're building your own API client with our SDK, you should consider using this class for similar purposes.

Hierarchy

Index

Constructors

Properties

Error code (see static constants on this class for possible values).

message: string
name: string
originalError?: unknown

Exception that triggered this error, if present.

stack?: string
INVALID_FORM: "INVALID_FORM" = 'INVALID_FORM'

Provided form data is invalid, e.g. email is too long or captcha is expired.

INVALID_NEW_PASSWORD: "INVALID_NEW_PASSWORD" = 'INVALID_NEW_PASSWORD'

Credentials are valid, but the new password provided in response to the NEW_PASSWORD_REQUIRED error doesn't meet the security requirements.

NEW_PASSWORD_REQUIRED: "NEW_PASSWORD_REQUIRED" = 'NEW_PASSWORD_REQUIRED'

Credentials are valid, but the session can be created only after changing the current password. This usually happens after a server-side password reset has been initiated for security reasons.

UNAUTHORIZED: "UNAUTHORIZED" = 'UNAUTHORIZED'

Credentials are invalid. That could mean empty or invalid email or password or otherwise incorrect auth data.

UNAVAILABLE: "UNAVAILABLE" = 'UNAVAILABLE'

Provided email is already taken. Applies to customer registration only.

UNKNOWN: "UNKNOWN" = 'UNKNOWN'

Any other or internal error that interrupted authentication.

stackTraceLimit: number
v8n: { constructor: any } = ...

Available class member validators.

Type declaration

  • constructor: any

Methods

  • captureStackTrace(targetObject: object, constructorOpt?: Function): void
  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void

Generated using TypeDoc