UNPKG

@datastax/astra-db-ts

Version:
23 lines (22 loc) 944 B
// Copyright Datastax, Inc // SPDX-License-Identifier: Apache-2.0 export class InvalidEnvironmentError extends Error { constructor(operation, currentEnvironment, expectedEnvironments, extra) { super(`Invalid environment '${currentEnvironment}' for operation '${operation}' (${extra}); expected environment(s): ${expectedEnvironments.map(e => `'${e}'`).join(', ')}`); Object.defineProperty(this, "currentEnvironment", { enumerable: true, configurable: true, writable: true, value: void 0 }); Object.defineProperty(this, "expectedEnvironments", { enumerable: true, configurable: true, writable: true, value: void 0 }); this.currentEnvironment = currentEnvironment; this.expectedEnvironments = expectedEnvironments; this.name = 'InvalidEnvironmentError'; } }