Represents an error is an explicit promise rejection as opposed to a thrown error. For example, if an error is errbacked by a callback API promisified through undefined or undefined and is not a typed error, it will be converted to a OperationalError which has the original error in the .cause property.

OperationalErrors are caught in .error handlers.

Hierarchy

Constructors

  • Parameters

    • Optional message: string

    Returns OperationalError

Properties

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

Type declaration

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void