Base error class for all Auth.js errors. It's optimized to be printed in the server logs in a nicely formatted way via the logger.error option.

Hierarchy

  • Error
    • AuthError

Constructors

  • Parameters

    • Optionalmessage: string | ErrorOptions
    • OptionalerrorOptions: ErrorOptions

    Returns AuthError

Properties

cause?: Record<string, unknown> & {
    err?: Error;
}
message: string
name: string
stack?: string
type: ErrorType

The error type. Used to identify the error in the logs.

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

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • OptionalconstructorOpt: Function

    Returns void