Represents an error related to authentication tokens.

This class is used to handle errors that occur during token-related operations, such as missing or invalid tokens. It extends ESPBaseError to provide a structured and consistent error-handling mechanism.

Hierarchy (View Summary)

Constructors

  • Creates an instance of ESPTokenError.

    Parameters

    • code: "MISSING_ACCESS_TOKEN" | "MISSING_REFRESH_TOKEN" | "EXTEND_SESSION_FAILED"

      The error code corresponding to a specific token-related error message from tokenErrorMessages.

    Returns ESPTokenError

Properties

cause?: unknown
code: string

The specific error code associated with the error.

label: string

A label to classify the error type.

message: string
name: string
stack?: string
prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

Optional override for formatting stack traces

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void