Class UnexpectedDataAPIResponseError

Overview

Error thrown when the Data API response is not as expected. Should never be thrown in normal operation.

Possible causes
  1. A Collection was used on a table, or vice versa.

  2. New Data API changes occurred that are not yet supported by the client.

  3. There is a bug in the Data API or the client.

Possible solutions

For #1, ensure that you're using the right Table or Collection class.

If #2 or #3, upgrade your client, and/or open an issue on the astra-db-ts GitHub repository.

  • If you open an issue, please include the full error message and any relevant context.
  • Please do not hesitate to do so, as there is likely a bug somewhere.

Hierarchy

  • Error
    • UnexpectedDataAPIResponseError

Constructors

Properties

message: string
name: string
rawDataAPIResponse?: unknown

The response that was unexpected.

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

  • Type Parameters

    • T

    Parameters

    • val: undefined | null | T
    • message: string
    • Optional rawDataAPIResponse: unknown

    Returns T