Class DataAPIErrorAbstract

Overview

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.

This is mainly useful for instanceof checks in catch blocks.

⚠️Note: While HTTP errors and timeouts may be represented by subclasses of this type, certain errors, such as connection errors, TypeErrors, etc. may be thrown by the underlying code directly.

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