Used when a resource conflict was detected.

Hierarchy (View Summary)

Constructors

Properties

cause?: unknown
code: string

An application-unique, readable error code.

message: string
name: string
stack?: string
status: number

The HTTP status code to associate with this error.

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

  • Checks if an object is an instance of AbstractError, or one of its subclasses.

    Parameters

    • error: unknown

      The object to check.

    • allowForeignModule: boolean = true

      Only check for similar looking error codes. You're going to want to use this if you're dealing with a setup where multiple versions of js-utils are loaded.

    Returns error is AbstractError

    true if the object is an AbstractError, false otherwise.