Class DataAPIErrorAbstract

An abstract class representing some exception that occurred related to the Data API. This is the base class for all Data API errors, and will never be thrown directly.

Useful for instanceof checks.

This is only for Data API related errors, such as a non-existent collection, or a duplicate key error. It is not, however, for errors such as an HTTP network error, or a malformed request. The exception being timeouts, which are represented by the DataAPITimeoutError class.

Hierarchy (view full)

Constructors

  • Parameters

    • Optional message: string

    Returns DataAPIError

Properties

message: string
name: string
stack?: string
prepareStackTrace?: ((err, stackTraces) => any)

Optional override for formatting stack traces

Type declaration

    • (err, stackTraces): any
    • Parameters

      • err: Error
      • stackTraces: CallSite[]

      Returns any

stackTraceLimit: number

Methods

  • Create .stack property on a target object

    Parameters

    • targetObject: object
    • Optional constructorOpt: Function

    Returns void