An exception thrown when certain operations are attempted in a DataAPIEnvironment that is not valid.

Field

currentEnvironment - The environment that was attempted to be used

Field

expectedEnvironments - The environments that are valid for the operation

Hierarchy

  • Error
    • InvalidEnvironmentError

Constructors

  • Internal

    Should not be instantiated by the user.

    Parameters

    • operation: string
    • currentEnvironment: string
    • expectedEnvironments: string[]
    • extra: string = ''

    Returns InvalidEnvironmentError

Properties

currentEnvironment: string

The environment that was attempted to be used.

expectedEnvironments: string[]

The environments that are valid for the operation.

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