@itwin/core-bentley
Version:
Bentley JavaScript core components
660 lines • 53.2 kB
JavaScript
"use strict";
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
* @module Errors
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.BentleyError = exports.RealityDataStatus = exports.GeoServiceStatus = exports.IModelHubStatus = exports.HttpStatus = exports.ChangeSetStatus = exports.RpcInterfaceStatus = exports.BriefcaseStatus = exports.IModelStatus = exports.BentleyStatus = exports.ITwinError = void 0;
const BeSQLite_1 = require("./BeSQLite");
const RepositoryStatus_1 = require("./internal/RepositoryStatus");
const JsonUtils_1 = require("./JsonUtils");
/** @beta */
var ITwinError;
(function (ITwinError) {
/** Instantiate a new `ITwinError` or subtype thereof.
* @see [[ITwinError.throwError]] to conveniently instantiate and throw the error.
*/
function create(args) {
const err = new Error(args.message);
Object.assign(err, args);
err.name = args.iTwinErrorId.key; // helpful because this is used by `toString` for Error class
return err;
}
ITwinError.create = create;
/** Instantiate and immediately throw an `ITwinError`.
* @see [[ITwinError.create]] to instantiate an error without throwing it.
*/
function throwError(args) {
throw create(args);
}
ITwinError.throwError = throwError;
/**
* Determine whether an error object was thrown by iTwin.js and has a specific scope and key.
*
* If the test succeeds, the type of `error` is coerced to `T`
* @param error The error to ve verified.
* @param scope value for `error.iTwinErrorId.scope`
* @param key value for `error.iTwinErrorId.key`
*/
function isError(error, scope, key) {
return JsonUtils_1.JsonUtils.isObject(error) && "iTwinErrorId" in error && JsonUtils_1.JsonUtils.isObject(error.iTwinErrorId)
&& error.iTwinErrorId.scope === scope && (undefined === key || error.iTwinErrorId.key === key);
}
ITwinError.isError = isError;
})(ITwinError || (exports.ITwinError = ITwinError = {}));
/** Standard status code.
* This status code should be rarely used.
* Prefer to throw an exception to indicate an error, rather than returning a special status code.
* If a status code is to be returned, prefer to return a more specific error status type such as IModelStatus or DbResult.
* @public
*/
var BentleyStatus;
(function (BentleyStatus) {
BentleyStatus[BentleyStatus["SUCCESS"] = 0] = "SUCCESS";
BentleyStatus[BentleyStatus["ERROR"] = 32768] = "ERROR";
})(BentleyStatus || (exports.BentleyStatus = BentleyStatus = {}));
/** Status codes that are used in conjunction with [[BentleyError]].
* Error status codes are divided into separate ranges for different kinds of errors. All known ranges at least should be defined here, to avoid collisions.
* @public
*/
var IModelStatus;
(function (IModelStatus) {
IModelStatus[IModelStatus["IMODEL_ERROR_BASE"] = 65536] = "IMODEL_ERROR_BASE";
IModelStatus[IModelStatus["Success"] = 0] = "Success";
IModelStatus[IModelStatus["AlreadyLoaded"] = 65537] = "AlreadyLoaded";
IModelStatus[IModelStatus["AlreadyOpen"] = 65538] = "AlreadyOpen";
IModelStatus[IModelStatus["BadArg"] = 65539] = "BadArg";
IModelStatus[IModelStatus["BadElement"] = 65540] = "BadElement";
IModelStatus[IModelStatus["BadModel"] = 65541] = "BadModel";
IModelStatus[IModelStatus["BadRequest"] = 65542] = "BadRequest";
IModelStatus[IModelStatus["BadSchema"] = 65543] = "BadSchema";
IModelStatus[IModelStatus["CannotUndo"] = 65544] = "CannotUndo";
IModelStatus[IModelStatus["CodeNotReserved"] = 65545] = "CodeNotReserved";
IModelStatus[IModelStatus["DeletionProhibited"] = 65546] = "DeletionProhibited";
IModelStatus[IModelStatus["DuplicateCode"] = 65547] = "DuplicateCode";
IModelStatus[IModelStatus["DuplicateName"] = 65548] = "DuplicateName";
IModelStatus[IModelStatus["ElementBlockedChange"] = 65549] = "ElementBlockedChange";
IModelStatus[IModelStatus["FileAlreadyExists"] = 65550] = "FileAlreadyExists";
IModelStatus[IModelStatus["FileNotFound"] = 65551] = "FileNotFound";
IModelStatus[IModelStatus["FileNotLoaded"] = 65552] = "FileNotLoaded";
IModelStatus[IModelStatus["ForeignKeyConstraint"] = 65553] = "ForeignKeyConstraint";
IModelStatus[IModelStatus["IdExists"] = 65554] = "IdExists";
IModelStatus[IModelStatus["InDynamicTransaction"] = 65555] = "InDynamicTransaction";
IModelStatus[IModelStatus["InvalidCategory"] = 65556] = "InvalidCategory";
IModelStatus[IModelStatus["InvalidCode"] = 65557] = "InvalidCode";
IModelStatus[IModelStatus["InvalidCodeSpec"] = 65558] = "InvalidCodeSpec";
IModelStatus[IModelStatus["InvalidId"] = 65559] = "InvalidId";
IModelStatus[IModelStatus["InvalidName"] = 65560] = "InvalidName";
IModelStatus[IModelStatus["InvalidParent"] = 65561] = "InvalidParent";
IModelStatus[IModelStatus["InvalidProfileVersion"] = 65562] = "InvalidProfileVersion";
IModelStatus[IModelStatus["IsCreatingChangeSet"] = 65563] = "IsCreatingChangeSet";
IModelStatus[IModelStatus["LockNotHeld"] = 65564] = "LockNotHeld";
IModelStatus[IModelStatus["Mismatch2d3d"] = 65565] = "Mismatch2d3d";
IModelStatus[IModelStatus["MismatchGcs"] = 65566] = "MismatchGcs";
IModelStatus[IModelStatus["MissingDomain"] = 65567] = "MissingDomain";
IModelStatus[IModelStatus["MissingHandler"] = 65568] = "MissingHandler";
IModelStatus[IModelStatus["MissingId"] = 65569] = "MissingId";
IModelStatus[IModelStatus["NoGeometry"] = 65570] = "NoGeometry";
IModelStatus[IModelStatus["NoMultiTxnOperation"] = 65571] = "NoMultiTxnOperation";
IModelStatus[IModelStatus["NotEnabled"] = 65573] = "NotEnabled";
IModelStatus[IModelStatus["NotFound"] = 65574] = "NotFound";
IModelStatus[IModelStatus["NotOpen"] = 65575] = "NotOpen";
IModelStatus[IModelStatus["NotOpenForWrite"] = 65576] = "NotOpenForWrite";
IModelStatus[IModelStatus["NotSameUnitBase"] = 65577] = "NotSameUnitBase";
IModelStatus[IModelStatus["NothingToRedo"] = 65578] = "NothingToRedo";
IModelStatus[IModelStatus["NothingToUndo"] = 65579] = "NothingToUndo";
IModelStatus[IModelStatus["ParentBlockedChange"] = 65580] = "ParentBlockedChange";
IModelStatus[IModelStatus["ReadError"] = 65581] = "ReadError";
IModelStatus[IModelStatus["ReadOnly"] = 65582] = "ReadOnly";
IModelStatus[IModelStatus["ReadOnlyDomain"] = 65583] = "ReadOnlyDomain";
IModelStatus[IModelStatus["RepositoryManagerError"] = 65584] = "RepositoryManagerError";
IModelStatus[IModelStatus["SQLiteError"] = 65585] = "SQLiteError";
IModelStatus[IModelStatus["TransactionActive"] = 65586] = "TransactionActive";
IModelStatus[IModelStatus["UnitsMissing"] = 65587] = "UnitsMissing";
IModelStatus[IModelStatus["UnknownFormat"] = 65588] = "UnknownFormat";
IModelStatus[IModelStatus["UpgradeFailed"] = 65589] = "UpgradeFailed";
IModelStatus[IModelStatus["ValidationFailed"] = 65590] = "ValidationFailed";
IModelStatus[IModelStatus["VersionTooNew"] = 65591] = "VersionTooNew";
IModelStatus[IModelStatus["VersionTooOld"] = 65592] = "VersionTooOld";
IModelStatus[IModelStatus["ViewNotFound"] = 65593] = "ViewNotFound";
IModelStatus[IModelStatus["WriteError"] = 65594] = "WriteError";
IModelStatus[IModelStatus["WrongClass"] = 65595] = "WrongClass";
IModelStatus[IModelStatus["WrongIModel"] = 65596] = "WrongIModel";
IModelStatus[IModelStatus["WrongDomain"] = 65597] = "WrongDomain";
IModelStatus[IModelStatus["WrongElement"] = 65598] = "WrongElement";
IModelStatus[IModelStatus["WrongHandler"] = 65599] = "WrongHandler";
IModelStatus[IModelStatus["WrongModel"] = 65600] = "WrongModel";
IModelStatus[IModelStatus["ConstraintNotUnique"] = 65601] = "ConstraintNotUnique";
IModelStatus[IModelStatus["NoGeoLocation"] = 65602] = "NoGeoLocation";
IModelStatus[IModelStatus["ServerTimeout"] = 65603] = "ServerTimeout";
IModelStatus[IModelStatus["NoContent"] = 65604] = "NoContent";
IModelStatus[IModelStatus["NotRegistered"] = 65605] = "NotRegistered";
IModelStatus[IModelStatus["FunctionNotFound"] = 65606] = "FunctionNotFound";
IModelStatus[IModelStatus["NoActiveCommand"] = 65607] = "NoActiveCommand";
IModelStatus[IModelStatus["Aborted"] = 65608] = "Aborted";
})(IModelStatus || (exports.IModelStatus = IModelStatus = {}));
/** Error statuses produced by various briefcase operations, typically encountered as the `errorNumber` of an [IModelError]($common).
* @public
*/
var BriefcaseStatus;
(function (BriefcaseStatus) {
BriefcaseStatus[BriefcaseStatus["BRIEFCASE_STATUS_BASE"] = 131072] = "BRIEFCASE_STATUS_BASE";
BriefcaseStatus[BriefcaseStatus["CannotAcquire"] = 131072] = "CannotAcquire";
BriefcaseStatus[BriefcaseStatus["CannotDownload"] = 131073] = "CannotDownload";
BriefcaseStatus[BriefcaseStatus["CannotUpload"] = 131074] = "CannotUpload";
BriefcaseStatus[BriefcaseStatus["CannotCopy"] = 131075] = "CannotCopy";
BriefcaseStatus[BriefcaseStatus["CannotDelete"] = 131076] = "CannotDelete";
BriefcaseStatus[BriefcaseStatus["VersionNotFound"] = 131077] = "VersionNotFound";
BriefcaseStatus[BriefcaseStatus["CannotApplyChanges"] = 131078] = "CannotApplyChanges";
BriefcaseStatus[BriefcaseStatus["DownloadCancelled"] = 131079] = "DownloadCancelled";
BriefcaseStatus[BriefcaseStatus["ContainsDeletedChangeSets"] = 131080] = "ContainsDeletedChangeSets";
})(BriefcaseStatus || (exports.BriefcaseStatus = BriefcaseStatus = {}));
/** RpcInterface status codes
* @beta
*/
var RpcInterfaceStatus;
(function (RpcInterfaceStatus) {
RpcInterfaceStatus[RpcInterfaceStatus["Success"] = 0] = "Success";
RpcInterfaceStatus[RpcInterfaceStatus["RPC_INTERFACE_ERROR_BASE"] = 135168] = "RPC_INTERFACE_ERROR_BASE";
/** The RpcInterface implemented by the server is incompatible with the interface requested by the client. */
RpcInterfaceStatus[RpcInterfaceStatus["IncompatibleVersion"] = 135168] = "IncompatibleVersion";
})(RpcInterfaceStatus || (exports.RpcInterfaceStatus = RpcInterfaceStatus = {}));
/** Error statuses produced by various Changeset operations, typically encountered as the `errorNumber` of an [IModelError]($common).
* @public
*/
var ChangeSetStatus;
(function (ChangeSetStatus) {
ChangeSetStatus[ChangeSetStatus["Success"] = 0] = "Success";
ChangeSetStatus[ChangeSetStatus["CHANGESET_ERROR_BASE"] = 90112] = "CHANGESET_ERROR_BASE";
/** Error applying a change set when reversing or reinstating it */
ChangeSetStatus[ChangeSetStatus["ApplyError"] = 90113] = "ApplyError";
/** Change tracking has not been enabled. The ChangeSet API mandates this. */
ChangeSetStatus[ChangeSetStatus["ChangeTrackingNotEnabled"] = 90114] = "ChangeTrackingNotEnabled";
/** Contents of the change stream are corrupted and does not match the ChangeSet */
ChangeSetStatus[ChangeSetStatus["CorruptedChangeStream"] = 90115] = "CorruptedChangeStream";
/** File containing the changes to the change set is not found */
ChangeSetStatus[ChangeSetStatus["FileNotFound"] = 90116] = "FileNotFound";
/** Error writing the contents of the change set to the backing change stream file */
ChangeSetStatus[ChangeSetStatus["FileWriteError"] = 90117] = "FileWriteError";
/** Cannot perform the operation since the Db has local changes */
ChangeSetStatus[ChangeSetStatus["HasLocalChanges"] = 90118] = "HasLocalChanges";
/** Cannot perform the operation since current transaction has uncommitted changes */
ChangeSetStatus[ChangeSetStatus["HasUncommittedChanges"] = 90119] = "HasUncommittedChanges";
/** Invalid ChangeSet Id */
ChangeSetStatus[ChangeSetStatus["InvalidId"] = 90120] = "InvalidId";
/** Invalid version of the change set */
ChangeSetStatus[ChangeSetStatus["InvalidVersion"] = 90121] = "InvalidVersion";
/** Cannot perform the operation since system is in the middle of a dynamic transaction */
ChangeSetStatus[ChangeSetStatus["InDynamicTransaction"] = 90122] = "InDynamicTransaction";
/** Cannot perform operation since system is in the middle of a creating a change set */
ChangeSetStatus[ChangeSetStatus["IsCreatingChangeSet"] = 90123] = "IsCreatingChangeSet";
/** Cannot perform operation since the system is not creating a change set */
ChangeSetStatus[ChangeSetStatus["IsNotCreatingChangeSet"] = 90124] = "IsNotCreatingChangeSet";
/** Error propagating the changes after the merge */
ChangeSetStatus[ChangeSetStatus["MergePropagationError"] = 90125] = "MergePropagationError";
/** No change sets to merge */
ChangeSetStatus[ChangeSetStatus["NothingToMerge"] = 90126] = "NothingToMerge";
/** No transactions are available to create a change set */
ChangeSetStatus[ChangeSetStatus["NoTransactions"] = 90127] = "NoTransactions";
/** Parent change set of the Db does not match the parent id of the change set */
ChangeSetStatus[ChangeSetStatus["ParentMismatch"] = 90128] = "ParentMismatch";
/** Error performing a SQLite operation on the Db */
ChangeSetStatus[ChangeSetStatus["SQLiteError"] = 90129] = "SQLiteError";
/** ChangeSet originated in a different Db */
ChangeSetStatus[ChangeSetStatus["WrongDgnDb"] = 90130] = "WrongDgnDb";
/** Could not open the DgnDb to merge change set */
ChangeSetStatus[ChangeSetStatus["CouldNotOpenDgnDb"] = 90131] = "CouldNotOpenDgnDb";
/** Cannot merge changes in in an open DgnDb. Close the DgnDb, and process the operation when it is opened. */
ChangeSetStatus[ChangeSetStatus["MergeSchemaChangesOnOpen"] = 90132] = "MergeSchemaChangesOnOpen";
/** Cannot reverse or reinstate schema changes. */
ChangeSetStatus[ChangeSetStatus["ReverseOrReinstateSchemaChanges"] = 90133] = "ReverseOrReinstateSchemaChanges";
/** Cannot process changes schema changes in an open DgnDb. Close the DgnDb, and process the operation when it is opened. */
ChangeSetStatus[ChangeSetStatus["ProcessSchemaChangesOnOpen"] = 90134] = "ProcessSchemaChangesOnOpen";
/** Cannot merge changes into a Readonly DgnDb. */
ChangeSetStatus[ChangeSetStatus["CannotMergeIntoReadonly"] = 90135] = "CannotMergeIntoReadonly";
/** Cannot merge changes into a Master DgnDb. */
ChangeSetStatus[ChangeSetStatus["CannotMergeIntoMaster"] = 90136] = "CannotMergeIntoMaster";
/** Cannot merge changes into a DgnDb that has reversed change sets. */
ChangeSetStatus[ChangeSetStatus["CannotMergeIntoReversed"] = 90137] = "CannotMergeIntoReversed";
/** ChangeSet(s) download was cancelled. */
ChangeSetStatus[ChangeSetStatus["DownloadCancelled"] = 90138] = "DownloadCancelled";
})(ChangeSetStatus || (exports.ChangeSetStatus = ChangeSetStatus = {}));
/** Status from returned HTTP status code
* @beta
*/
var HttpStatus;
(function (HttpStatus) {
/** 2xx Success */
HttpStatus[HttpStatus["Success"] = 0] = "Success";
/** 1xx Informational responses */
HttpStatus[HttpStatus["Info"] = 94209] = "Info";
/** 3xx Redirection */
HttpStatus[HttpStatus["Redirection"] = 94210] = "Redirection";
/** 4xx Client errors */
HttpStatus[HttpStatus["ClientError"] = 94211] = "ClientError";
/** 5xx Server errors */
HttpStatus[HttpStatus["ServerError"] = 94212] = "ServerError";
})(HttpStatus || (exports.HttpStatus = HttpStatus = {}));
/** Statuses produced by APIs that interact with iModelHub, typically encountered as the `errorNumber` of an [IModelError]($common).
* @public
*/
var IModelHubStatus;
(function (IModelHubStatus) {
IModelHubStatus[IModelHubStatus["Success"] = 0] = "Success";
IModelHubStatus[IModelHubStatus["IMODELHUBERROR_BASE"] = 102400] = "IMODELHUBERROR_BASE";
IModelHubStatus[IModelHubStatus["IMODELHUBERROR_REQUESTERRORBASE"] = 102656] = "IMODELHUBERROR_REQUESTERRORBASE";
IModelHubStatus[IModelHubStatus["Unknown"] = 102401] = "Unknown";
IModelHubStatus[IModelHubStatus["MissingRequiredProperties"] = 102402] = "MissingRequiredProperties";
IModelHubStatus[IModelHubStatus["InvalidPropertiesValues"] = 102403] = "InvalidPropertiesValues";
IModelHubStatus[IModelHubStatus["UserDoesNotHavePermission"] = 102404] = "UserDoesNotHavePermission";
IModelHubStatus[IModelHubStatus["UserDoesNotHaveAccess"] = 102405] = "UserDoesNotHaveAccess";
IModelHubStatus[IModelHubStatus["InvalidBriefcase"] = 102406] = "InvalidBriefcase";
IModelHubStatus[IModelHubStatus["BriefcaseDoesNotExist"] = 102407] = "BriefcaseDoesNotExist";
IModelHubStatus[IModelHubStatus["BriefcaseDoesNotBelongToUser"] = 102408] = "BriefcaseDoesNotBelongToUser";
IModelHubStatus[IModelHubStatus["AnotherUserPushing"] = 102409] = "AnotherUserPushing";
IModelHubStatus[IModelHubStatus["ChangeSetAlreadyExists"] = 102410] = "ChangeSetAlreadyExists";
IModelHubStatus[IModelHubStatus["ChangeSetDoesNotExist"] = 102411] = "ChangeSetDoesNotExist";
IModelHubStatus[IModelHubStatus["FileIsNotUploaded"] = 102412] = "FileIsNotUploaded";
IModelHubStatus[IModelHubStatus["iModelIsNotInitialized"] = 102413] = "iModelIsNotInitialized";
IModelHubStatus[IModelHubStatus["ChangeSetPointsToBadSeed"] = 102414] = "ChangeSetPointsToBadSeed";
IModelHubStatus[IModelHubStatus["OperationFailed"] = 102415] = "OperationFailed";
IModelHubStatus[IModelHubStatus["PullIsRequired"] = 102416] = "PullIsRequired";
IModelHubStatus[IModelHubStatus["MaximumNumberOfBriefcasesPerUser"] = 102417] = "MaximumNumberOfBriefcasesPerUser";
IModelHubStatus[IModelHubStatus["MaximumNumberOfBriefcasesPerUserPerMinute"] = 102418] = "MaximumNumberOfBriefcasesPerUserPerMinute";
IModelHubStatus[IModelHubStatus["DatabaseTemporarilyLocked"] = 102419] = "DatabaseTemporarilyLocked";
IModelHubStatus[IModelHubStatus["iModelIsLocked"] = 102420] = "iModelIsLocked";
IModelHubStatus[IModelHubStatus["CodesExist"] = 102421] = "CodesExist";
IModelHubStatus[IModelHubStatus["LocksExist"] = 102422] = "LocksExist";
IModelHubStatus[IModelHubStatus["iModelAlreadyExists"] = 102423] = "iModelAlreadyExists";
IModelHubStatus[IModelHubStatus["iModelDoesNotExist"] = 102424] = "iModelDoesNotExist";
IModelHubStatus[IModelHubStatus["FileDoesNotExist"] = 102425] = "FileDoesNotExist";
IModelHubStatus[IModelHubStatus["FileAlreadyExists"] = 102426] = "FileAlreadyExists";
IModelHubStatus[IModelHubStatus["LockDoesNotExist"] = 102427] = "LockDoesNotExist";
IModelHubStatus[IModelHubStatus["LockOwnedByAnotherBriefcase"] = 102428] = "LockOwnedByAnotherBriefcase";
IModelHubStatus[IModelHubStatus["CodeStateInvalid"] = 102429] = "CodeStateInvalid";
IModelHubStatus[IModelHubStatus["CodeReservedByAnotherBriefcase"] = 102430] = "CodeReservedByAnotherBriefcase";
IModelHubStatus[IModelHubStatus["CodeDoesNotExist"] = 102431] = "CodeDoesNotExist";
IModelHubStatus[IModelHubStatus["EventTypeDoesNotExist"] = 102432] = "EventTypeDoesNotExist";
IModelHubStatus[IModelHubStatus["EventSubscriptionDoesNotExist"] = 102433] = "EventSubscriptionDoesNotExist";
IModelHubStatus[IModelHubStatus["EventSubscriptionAlreadyExists"] = 102434] = "EventSubscriptionAlreadyExists";
IModelHubStatus[IModelHubStatus["ITwinIdIsNotSpecified"] = 102435] = "ITwinIdIsNotSpecified";
IModelHubStatus[IModelHubStatus["FailedToGetITwinPermissions"] = 102436] = "FailedToGetITwinPermissions";
IModelHubStatus[IModelHubStatus["FailedToGetITwinMembers"] = 102437] = "FailedToGetITwinMembers";
IModelHubStatus[IModelHubStatus["ChangeSetAlreadyHasVersion"] = 102438] = "ChangeSetAlreadyHasVersion";
IModelHubStatus[IModelHubStatus["VersionAlreadyExists"] = 102439] = "VersionAlreadyExists";
IModelHubStatus[IModelHubStatus["JobSchedulingFailed"] = 102440] = "JobSchedulingFailed";
IModelHubStatus[IModelHubStatus["ConflictsAggregate"] = 102441] = "ConflictsAggregate";
IModelHubStatus[IModelHubStatus["FailedToGetITwinById"] = 102442] = "FailedToGetITwinById";
IModelHubStatus[IModelHubStatus["DatabaseOperationFailed"] = 102443] = "DatabaseOperationFailed";
IModelHubStatus[IModelHubStatus["SeedFileInitializationFailed"] = 102444] = "SeedFileInitializationFailed";
IModelHubStatus[IModelHubStatus["FailedToGetAssetPermissions"] = 102445] = "FailedToGetAssetPermissions";
IModelHubStatus[IModelHubStatus["FailedToGetAssetMembers"] = 102446] = "FailedToGetAssetMembers";
IModelHubStatus[IModelHubStatus["ITwinDoesNotExist"] = 102447] = "ITwinDoesNotExist";
IModelHubStatus[IModelHubStatus["LockChunkDoesNotExist"] = 102449] = "LockChunkDoesNotExist";
IModelHubStatus[IModelHubStatus["CheckpointAlreadyExists"] = 102450] = "CheckpointAlreadyExists";
IModelHubStatus[IModelHubStatus["CheckpointDoesNotExist"] = 102451] = "CheckpointDoesNotExist";
// Errors that are returned for incorrect iModelHub request.
IModelHubStatus[IModelHubStatus["UndefinedArgumentError"] = 102657] = "UndefinedArgumentError";
IModelHubStatus[IModelHubStatus["InvalidArgumentError"] = 102658] = "InvalidArgumentError";
IModelHubStatus[IModelHubStatus["MissingDownloadUrlError"] = 102659] = "MissingDownloadUrlError";
IModelHubStatus[IModelHubStatus["NotSupportedInBrowser"] = 102660] = "NotSupportedInBrowser";
IModelHubStatus[IModelHubStatus["FileHandlerNotSet"] = 102661] = "FileHandlerNotSet";
IModelHubStatus[IModelHubStatus["FileNotFound"] = 102662] = "FileNotFound";
IModelHubStatus[IModelHubStatus["InitializationTimeout"] = 102663] = "InitializationTimeout";
})(IModelHubStatus || (exports.IModelHubStatus = IModelHubStatus = {}));
/** GeoServiceStatus errors
* @public
*/
var GeoServiceStatus;
(function (GeoServiceStatus) {
GeoServiceStatus[GeoServiceStatus["Success"] = 0] = "Success";
GeoServiceStatus[GeoServiceStatus["GEOSERVICESTATUS_BASE"] = 147456] = "GEOSERVICESTATUS_BASE";
// Error mapped from 'IModelStatus'
GeoServiceStatus[GeoServiceStatus["NoGeoLocation"] = 65602] = "NoGeoLocation";
// Following errors are mapped from 'GeoCoordStatus'
GeoServiceStatus[GeoServiceStatus["OutOfUsefulRange"] = 147457] = "OutOfUsefulRange";
GeoServiceStatus[GeoServiceStatus["OutOfMathematicalDomain"] = 147458] = "OutOfMathematicalDomain";
GeoServiceStatus[GeoServiceStatus["NoDatumConverter"] = 147459] = "NoDatumConverter";
GeoServiceStatus[GeoServiceStatus["VerticalDatumConvertError"] = 147460] = "VerticalDatumConvertError";
GeoServiceStatus[GeoServiceStatus["CSMapError"] = 147461] = "CSMapError";
/**
* @deprecated in 5.0 - will not be removed until after 2026-06-13. This status is never returned.
*/
GeoServiceStatus[GeoServiceStatus["Pending"] = 147462] = "Pending";
})(GeoServiceStatus || (exports.GeoServiceStatus = GeoServiceStatus = {}));
/** Error status from various reality data operations
* @alpha
*/
var RealityDataStatus;
(function (RealityDataStatus) {
RealityDataStatus[RealityDataStatus["Success"] = 0] = "Success";
RealityDataStatus[RealityDataStatus["REALITYDATA_ERROR_BASE"] = 151552] = "REALITYDATA_ERROR_BASE";
RealityDataStatus[RealityDataStatus["InvalidData"] = 151553] = "InvalidData";
})(RealityDataStatus || (exports.RealityDataStatus = RealityDataStatus = {}));
/**
* Base exception class for legacy iTwin.js errors.
* For backwards compatibility only. Do not create new subclasses of BentleyError. Instead use [[ITwinError]].
* @public
*/
class BentleyError extends Error {
errorNumber;
static iTwinErrorScope = "bentley-error";
_metaData;
/**
* @param errorNumber The a number that identifies of the problem.
* @param message message that describes the problem (should not be localized).
* @param metaData metaData about the exception.
*/
constructor(errorNumber, message, metaData) {
super(message);
this.errorNumber = errorNumber;
this.errorNumber = errorNumber;
this._metaData = metaData;
this.name = this._initName();
}
/** supply the value for iTwinErrorId */
get iTwinErrorId() {
return { scope: BentleyError.iTwinErrorScope, key: this.name };
}
/** value for logging metadata */
get loggingMetadata() { return this.getMetaData(); }
/**
* Determine if an error object implements the `LegacyITwinErrorWithNumber` interface.
*
* If the test succeeds, the type of `error` is coerced to `T`
* @note this method does *not* test that the object is an `instanceOf BentleyError`.
* @beta
*/
static isError(error, errorNumber) {
return ITwinError.isError(error, BentleyError.iTwinErrorScope) &&
typeof error.errorNumber === "number" && (errorNumber === undefined || error.errorNumber === errorNumber);
}
/** Returns true if this BentleyError includes (optional) metadata. */
get hasMetaData() { return undefined !== this._metaData; }
/** get the meta data associated with this BentleyError, if any. */
getMetaData() {
return BentleyError.getMetaData(this._metaData);
}
/** get the metadata object associated with an ExceptionMetaData, if any. */
static getMetaData(metaData) {
return (typeof metaData === "function") ? metaData() : metaData;
}
/** This function returns the name of each error status. Override this method to handle more error status codes. */
_initName() {
return BentleyError.getErrorKey(this.errorNumber);
}
/** This function returns the name of each error status. */
static getErrorKey(errorNumber) {
switch (errorNumber) {
case IModelStatus.AlreadyLoaded: return "Already Loaded";
case IModelStatus.AlreadyOpen: return "Already Open";
case IModelStatus.BadArg: return "Bad Arg";
case IModelStatus.BadElement: return "Bad Element";
case IModelStatus.BadModel: return "Bad Model";
case IModelStatus.BadRequest: return "Bad Request";
case IModelStatus.BadSchema: return "Bad Schema";
case IModelStatus.CannotUndo: return "Can not Undo";
case IModelStatus.CodeNotReserved: return "Code Not Reserved";
case IModelStatus.DeletionProhibited: return "Deletion Prohibited";
case IModelStatus.DuplicateCode: return "Duplicate Code";
case IModelStatus.DuplicateName: return "Duplicate Name";
case IModelStatus.ElementBlockedChange: return "Element Blocked Change";
case IModelStatus.FileAlreadyExists: return "File Already Exists";
case IModelStatus.FileNotFound: return "File Not Found";
case IModelStatus.FileNotLoaded: return "File Not Loaded";
case IModelStatus.ForeignKeyConstraint: return "ForeignKey Constraint";
case IModelStatus.IdExists: return "Id Exists";
case IModelStatus.InDynamicTransaction: return "InDynamicTransaction";
case IModelStatus.InvalidCategory: return "Invalid Category";
case IModelStatus.InvalidCode: return "Invalid Code";
case IModelStatus.InvalidCodeSpec: return "Invalid CodeSpec";
case IModelStatus.InvalidId: return "Invalid Id";
case IModelStatus.InvalidName: return "Invalid Name";
case IModelStatus.InvalidParent: return "Invalid Parent";
case IModelStatus.InvalidProfileVersion: return "Invalid Profile Version";
case IModelStatus.IsCreatingChangeSet: return "IsCreatingChangeSet";
case IModelStatus.LockNotHeld: return "Lock Not Held";
case IModelStatus.Mismatch2d3d: return "Mismatch 2d3d";
case IModelStatus.MismatchGcs: return "Mismatch Gcs";
case IModelStatus.MissingDomain: return "Missing Domain";
case IModelStatus.MissingHandler: return "Missing Handler";
case IModelStatus.MissingId: return "Missing Id";
case IModelStatus.NoGeometry: return "No Geometry";
case IModelStatus.NoMultiTxnOperation: return "NoMultiTxnOperation";
case IModelStatus.NotEnabled: return "Not Enabled";
case IModelStatus.NotFound: return "Not Found";
case IModelStatus.NotOpen: return "Not Open";
case IModelStatus.NotOpenForWrite: return "Not Open For Write";
case IModelStatus.NotSameUnitBase: return "Not Same Unit Base";
case IModelStatus.NothingToRedo: return "Nothing To Redo";
case IModelStatus.NothingToUndo: return "Nothing To Undo";
case IModelStatus.ParentBlockedChange: return "Parent Blocked Change";
case IModelStatus.ReadError: return "Read Error";
case IModelStatus.ReadOnly: return "ReadOnly";
case IModelStatus.ReadOnlyDomain: return "ReadOnlyDomain";
case IModelStatus.RepositoryManagerError: return "RepositoryManagerError";
case IModelStatus.SQLiteError: return "SQLiteError";
case IModelStatus.TransactionActive: return "Transaction Active";
case IModelStatus.UnitsMissing: return "Units Missing";
case IModelStatus.UnknownFormat: return "Unknown Format";
case IModelStatus.UpgradeFailed: return "Upgrade Failed";
case IModelStatus.ValidationFailed: return "Validation Failed";
case IModelStatus.VersionTooNew: return "Version Too New";
case IModelStatus.VersionTooOld: return "Version Too Old";
case IModelStatus.ViewNotFound: return "View Not Found";
case IModelStatus.WriteError: return "Write Error";
case IModelStatus.WrongClass: return "Wrong Class";
case IModelStatus.WrongIModel: return "Wrong IModel";
case IModelStatus.WrongDomain: return "Wrong Domain";
case IModelStatus.WrongElement: return "Wrong Element";
case IModelStatus.WrongHandler: return "Wrong Handler";
case IModelStatus.WrongModel: return "Wrong Model";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR: return "BE_SQLITE_ERROR";
case BeSQLite_1.DbResult.BE_SQLITE_INTERNAL: return "BE_SQLITE_INTERNAL";
case BeSQLite_1.DbResult.BE_SQLITE_PERM: return "BE_SQLITE_PERM";
case BeSQLite_1.DbResult.BE_SQLITE_ABORT: return "BE_SQLITE_ABORT";
case BeSQLite_1.DbResult.BE_SQLITE_BUSY: return "Db is busy";
case BeSQLite_1.DbResult.BE_SQLITE_LOCKED: return "Db is Locked";
case BeSQLite_1.DbResult.BE_SQLITE_NOMEM: return "BE_SQLITE_NOMEM";
case BeSQLite_1.DbResult.BE_SQLITE_READONLY: return "Readonly";
case BeSQLite_1.DbResult.BE_SQLITE_INTERRUPT: return "BE_SQLITE_INTERRUPT";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR: return "BE_SQLITE_IOERR";
case BeSQLite_1.DbResult.BE_SQLITE_CORRUPT: return "BE_SQLITE_CORRUPT";
case BeSQLite_1.DbResult.BE_SQLITE_NOTFOUND: return "Not Found";
case BeSQLite_1.DbResult.BE_SQLITE_FULL: return "BE_SQLITE_FULL";
case BeSQLite_1.DbResult.BE_SQLITE_CANTOPEN: return "Can't open";
case BeSQLite_1.DbResult.BE_SQLITE_PROTOCOL: return "BE_SQLITE_PROTOCOL";
case BeSQLite_1.DbResult.BE_SQLITE_EMPTY: return "BE_SQLITE_EMPTY";
case BeSQLite_1.DbResult.BE_SQLITE_SCHEMA: return "BE_SQLITE_SCHEMA";
case BeSQLite_1.DbResult.BE_SQLITE_TOOBIG: return "BE_SQLITE_TOOBIG";
case BeSQLite_1.DbResult.BE_SQLITE_MISMATCH: return "BE_SQLITE_MISMATCH";
case BeSQLite_1.DbResult.BE_SQLITE_MISUSE: return "BE_SQLITE_MISUSE";
case BeSQLite_1.DbResult.BE_SQLITE_NOLFS: return "BE_SQLITE_NOLFS";
case BeSQLite_1.DbResult.BE_SQLITE_AUTH: return "BE_SQLITE_AUTH";
case BeSQLite_1.DbResult.BE_SQLITE_FORMAT: return "BE_SQLITE_FORMAT";
case BeSQLite_1.DbResult.BE_SQLITE_RANGE: return "BE_SQLITE_RANGE";
case BeSQLite_1.DbResult.BE_SQLITE_NOTADB: return "Not a Database";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_READ: return "BE_SQLITE_IOERR_READ";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHORT_READ: return "BE_SQLITE_IOERR_SHORT_READ";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_WRITE: return "BE_SQLITE_IOERR_WRITE";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_FSYNC: return "BE_SQLITE_IOERR_FSYNC";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_DIR_FSYNC: return "BE_SQLITE_IOERR_DIR_FSYNC";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_TRUNCATE: return "BE_SQLITE_IOERR_TRUNCATE";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_FSTAT: return "BE_SQLITE_IOERR_FSTAT";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_UNLOCK: return "BE_SQLITE_IOERR_UNLOCK";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_RDLOCK: return "BE_SQLITE_IOERR_RDLOCK";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_DELETE: return "BE_SQLITE_IOERR_DELETE";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_BLOCKED: return "BE_SQLITE_IOERR_BLOCKED";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_NOMEM: return "BE_SQLITE_IOERR_NOMEM";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_ACCESS: return "BE_SQLITE_IOERR_ACCESS";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_CHECKRESERVEDLOCK: return "BE_SQLITE_IOERR_CHECKRESERVEDLOCK";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_LOCK: return "BE_SQLITE_IOERR_LOCK";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_CLOSE: return "BE_SQLITE_IOERR_CLOSE";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_DIR_CLOSE: return "BE_SQLITE_IOERR_DIR_CLOSE";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHMOPEN: return "BE_SQLITE_IOERR_SHMOPEN";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHMSIZE: return "BE_SQLITE_IOERR_SHMSIZE";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHMLOCK: return "BE_SQLITE_IOERR_SHMLOCK";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SHMMAP: return "BE_SQLITE_IOERR_SHMMAP";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_SEEK: return "BE_SQLITE_IOERR_SEEK";
case BeSQLite_1.DbResult.BE_SQLITE_IOERR_DELETE_NOENT: return "BE_SQLITE_IOERR_DELETE_NOENT";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_DataTransformRequired: return "Schema update require to transform data";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_FileExists: return "File Exists";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_AlreadyOpen: return "Already Open";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_NoPropertyTable: return "No Property Table";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_FileNotFound: return "File Not Found";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_NoTxnActive: return "No Txn Active";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_BadDbProfile: return "Bad Db Profile";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_InvalidProfileVersion: return "Invalid Profile Version";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileUpgradeFailed: return "Profile Upgrade Failed";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileTooOldForReadWrite: return "Profile Too Old For ReadWrite";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileTooOld: return "Profile Too Old";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileTooNewForReadWrite: return "Profile Too New For ReadWrite";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ProfileTooNew: return "Profile Too New";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_ChangeTrackError: return "ChangeTrack Error";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_InvalidChangeSetVersion: return "Invalid ChangeSet Version";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaUpgradeRequired: return "Schema Upgrade Required";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaTooNew: return "Schema Too New";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaTooOld: return "Schema Too Old";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaLockFailed: return "Schema Lock Failed";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaUpgradeFailed: return "Schema Upgrade Failed";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaImportFailed: return "Schema Import Failed";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_CouldNotAcquireLocksOrCodes: return "Could Not Acquire Locks Or Codes";
case BeSQLite_1.DbResult.BE_SQLITE_ERROR_SchemaUpgradeRecommended: return "Recommended that the schemas found in the database be upgraded";
case BeSQLite_1.DbResult.BE_SQLITE_LOCKED_SHAREDCACHE: return "BE_SQLITE_LOCKED_SHAREDCACHE";
case BeSQLite_1.DbResult.BE_SQLITE_BUSY_RECOVERY: return "BE_SQLITE_BUSY_RECOVERY";
case BeSQLite_1.DbResult.BE_SQLITE_CANTOPEN_NOTEMPDIR: return "SQLite No Temp Dir";
case BeSQLite_1.DbResult.BE_SQLITE_CANTOPEN_ISDIR: return "BE_SQLITE_CANTOPEN_ISDIR";
case BeSQLite_1.DbResult.BE_SQLITE_CANTOPEN_FULLPATH: return "BE_SQLITE_CANTOPEN_FULLPATH";
case BeSQLite_1.DbResult.BE_SQLITE_CORRUPT_VTAB: return "BE_SQLITE_CORRUPT_VTAB";
case BeSQLite_1.DbResult.BE_SQLITE_READONLY_RECOVERY: return "BE_SQLITE_READONLY_RECOVERY";
case BeSQLite_1.DbResult.BE_SQLITE_READONLY_CANTLOCK: return "BE_SQLITE_READONLY_CANTLOCK";
case BeSQLite_1.DbResult.BE_SQLITE_READONLY_ROLLBACK: return "BE_SQLITE_READONLY_ROLLBACK";
case BeSQLite_1.DbResult.BE_SQLITE_ABORT_ROLLBACK: return "BE_SQLITE_ABORT_ROLLBACK";
case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_CHECK: return "BE_SQLITE_CONSTRAINT_CHECK";
case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_COMMITHOOK: return "CommitHook Constraint Error";
case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_FOREIGNKEY: return "Foreign Key Constraint Error";
case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_FUNCTION: return "Function Constraint Error";
case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_NOTNULL: return "NotNull Constraint Error";
case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_PRIMARYKEY: return "Primary Key Constraint Error";
case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_TRIGGER: return "Trigger Constraint Error";
case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_UNIQUE: return "Unique Constraint Error";
case BeSQLite_1.DbResult.BE_SQLITE_CONSTRAINT_VTAB: return "VTable Constraint Error";
case BentleyStatus.ERROR: return "Error";
case BriefcaseStatus.CannotAcquire: return "CannotAcquire";
case BriefcaseStatus.CannotDownload: return "CannotDownload";
case BriefcaseStatus.CannotCopy: return "CannotCopy";
case BriefcaseStatus.CannotDelete: return "CannotDelete";
case BriefcaseStatus.VersionNotFound: return "VersionNotFound";
case BriefcaseStatus.DownloadCancelled: return "DownloadCancelled";
case BriefcaseStatus.ContainsDeletedChangeSets: return "ContainsDeletedChangeSets";
case RpcInterfaceStatus.IncompatibleVersion: return "RpcInterfaceStatus.IncompatibleVersion";
case ChangeSetStatus.ApplyError: return "Error applying a change set";
case ChangeSetStatus.ChangeTrackingNotEnabled: return "Change tracking has not been enabled. The ChangeSet API mandates this";
case ChangeSetStatus.CorruptedChangeStream: return "Contents of the change stream are corrupted and does not match the ChangeSet";
case ChangeSetStatus.FileNotFound: return "File containing the changes was not found";
case ChangeSetStatus.FileWriteError: return "Error writing the contents of the change set to the backing change stream file";
case ChangeSetStatus.HasLocalChanges: return "Cannot perform the operation since the Db has local changes";
case ChangeSetStatus.HasUncommittedChanges: return "Cannot perform the operation since current transaction has uncommitted changes";
case ChangeSetStatus.InvalidId: return "Invalid ChangeSet Id";
case ChangeSetStatus.InvalidVersion: return "Invalid version of the change set";
case ChangeSetStatus.InDynamicTransaction: return "Cannot perform the operation since system is in the middle of a dynamic transaction";
case ChangeSetStatus.IsCreatingChangeSet: return "Cannot perform operation since system is in the middle of a creating a change set";
case ChangeSetStatus.IsNotCreatingChangeSet: return "Cannot perform operation since the system is not creating a change set";
case ChangeSetStatus.MergePropagationError: return "Error propagating the changes after the merge";
case ChangeSetStatus.NothingToMerge: return "No change sets to merge";
case ChangeSetStatus.NoTransactions: return "No transactions are available to create a change set";
case ChangeSetStatus.ParentMismatch: return "Parent change set of the Db does not match the parent id of the change set";
case ChangeSetStatus.SQLiteError: return "Error performing a SQLite operation on the Db";
case ChangeSetStatus.WrongDgnDb: return "ChangeSet originated in a different Db";
case ChangeSetStatus.CouldNotOpenDgnDb: return "Could not open the DgnDb to merge change set";
case ChangeSetStatus.MergeSchemaChangesOnOpen: return "Cannot merge changes in in an open DgnDb. Close the DgnDb, and process the operation when it is opened";
case ChangeSetStatus.ReverseOrReinstateSchemaChanges: return "Cannot reverse or reinstate schema changes.";
case ChangeSetStatus.ProcessSchemaChangesOnOpen: return "Cannot process changes schema changes in an open DgnDb. Close the DgnDb, and process the operation when it is opened";
case ChangeSetStatus.CannotMergeIntoReadonly: return "Cannot merge changes into a Readonly DgnDb";
case ChangeSetStatus.CannotMergeIntoMaster: return "Cannot merge changes into a Master DgnDb";
case ChangeSetStatus.CannotMergeIntoReversed: return "Cannot merge changes into a DgnDb that has reversed change sets";
case ChangeSetStatus.DownloadCancelled: return "ChangeSet(s) download was cancelled.";
case RepositoryStatus_1.RepositoryStatus.ServerUnavailable: return "ServerUnavailable";
case RepositoryStatus_1.RepositoryStatus.LockAlreadyHeld: return "LockAlreadyHeld";
case RepositoryStatus_1.RepositoryStatus.SyncError: return "SyncError";
case RepositoryStatus_1.RepositoryStatus.InvalidResponse: return "InvalidResponse";
case RepositoryStatus_1.RepositoryStatus.PendingTransactions: return "PendingTransactions";
case RepositoryStatus_1.RepositoryStatus.LockUsed: return "LockUsed";
case RepositoryStatus_1.RepositoryStatus.CannotCreateChangeSet: return "CannotCreateChangeSet";
case RepositoryStatus_1.RepositoryStatus.InvalidRequest: return "InvalidRequest";
case RepositoryStatus_1.RepositoryStatus.ChangeSetRequired: return "ChangeSetRequired";
case RepositoryStatus_1.RepositoryStatus.CodeUnavailable: return "CodeUnavailable";
case RepositoryStatus_1.RepositoryStatus.CodeNotReserved: return "CodeNotReserved";
case RepositoryStatus_1.RepositoryStatus.CodeUsed: return "CodeUsed";
case RepositoryStatus_1.RepositoryStatus.LockNotHeld: return "LockNotHeld";
case RepositoryStatus_1.RepositoryStatus.RepositoryIsLocked: return "RepositoryIsLocked";
case RepositoryStatus_1.RepositoryStatus.ChannelConstraintViolation: return "ChannelConstraintViolation";
case HttpStatus.Info: return "HTTP Info";
case HttpStatus.Redirection: return "HTTP Redirection";
case HttpStatus.ClientError: return "HTTP Client error";
case HttpStatus.ServerError: return "HTTP Server error";
case IModelHubStatus.Unknown: return "Unknown error";
case IModelHubStatus.MissingRequiredProperties: return "Missing required properties";
case IModelHubStatus.InvalidPropertiesValues: return "Invalid properties values";
case IModelHubStatus.UserDoesNotHavePermission: return "User does not have permission";
case IModelHubStatus.UserDoesNotHaveAccess: return "User does not have access";
case IModelHubStatus.InvalidBriefcase: return "Invalid briefcase";
case IModelHubStatus.BriefcaseDoesNotExist: return "Briefcase does not exist";
case IModelHubStatus.BriefcaseDoesNotBelongToUser: return "Briefcase does not belong to user";
case IModelHubStatus.AnotherUserPushing: return "Another user pushing";
case IModelHubStatus.ChangeSetAlreadyExists: return "ChangeSet already exists";
case IModelHubStatus.ChangeSetDoesNotExist: return "ChangeSet does not exist";
case IModelHubStatus.FileIsNotUploaded: return "File is not uploaded";
case IModelHubStatus.iModelIsNotInitialized: return "iModel is not initialized";
case IModelHubStatus.ChangeSetPointsToBadSeed: return "ChangeSet points to a bad seed file";
case IModelHubStatus.OperationFailed: return "iModelHub operation has failed";
case IModelHubStatus.PullIsRequired: return "Pull is required";
case IModelHubStatus.MaximumNumberOfBriefcasesPerUser: return "Limit of briefcases per user was reached";
case IModelHubStatus.MaximumNumberOfBriefcasesPerUserPerMinute: return "Limit of briefcases per user per minute was reached";
case IModelHubStatus.DatabaseTemporarilyLocked: return "Database is temporarily locked";
case IModelHubStatus.iModelIsLocked: return "iModel is locked";
case IModelHubStatus.CodesExist: return "Code already exists";
case IModelHubStatus.LocksExist: return "Lock already exists";
case IModelHubStatus.iModelAlreadyExists: return "iModel already exists";
case IModelHubStatus.iModelDoesNotExist: return "iModel does not exist";
case IModelHubStatus.LockDoesNotExist: return "Lock does not exist";
case IModelHubStatus.LockChunkDoesNotExist: return "Lock chunk does not exist";
case IModelHubStatus.LockOwnedByAnotherBriefcase: return "Lock is owned by another briefcase";
case IModelHubStatus.CodeStateInvalid: return "Code state is invalid";
case IModelHubStatus.CodeReservedByAnotherBriefcase: return "Code is reserved by another briefcase";
case IModelHubStatus.CodeDoesNotExist: return "Code does not exist";
case IModelHubStatus.FileDoesNotExist: return "File does not exist";
case IModelHubStatus.FileAlreadyExists: return "File already exists";
case IModelHubStatus.EventTypeDoesNotExist: return "Event type does not exist";
case IModelHubStatus.EventSubscriptionDoesNotExist: return "Event subscription does not exist";
case IModelHubStatus.EventSubscriptionAlreadyExists: return "Event subscription already exists";
case IModelHubStatus.ITwinIdIsNotSpecified: return "ITwin Id is not specified";
case IModelHubStatus.FailedToGetITwinPermissions: return "Failed to get iTwin permissions";
case IModelHubStatus.FailedToGetITwinMembers: return "Failed to get iTwin members";
case IModelHubStatus.FailedToGetAssetPermissions: return "Failed to get asset permissions";
case IModelHubStatus.FailedToGetAssetMembers: return "Failed to get asset members";
case IModelHubStatus.ChangeSetAlreadyHasVersion: return "ChangeSet already has version";
case IModelHubStatus.VersionAlreadyExists: return "Version already exists";
case IModelHubStatus.JobSchedulingFailed: return "Failed to schedule a background job";
case IModelHubStatus.ConflictsAggregate: return "Codes or locks are owned by another briefcase";
case IModelHubStatus.FailedToGetITwinById: return "Failed to query iTwin by its id";
case IModelHubStatus.DatabaseOperationFailed: return "Database operation has failed";
case IModelHubStatus.ITwinDoesNotExist: return "ITwin does not exist";
case IModelHubStatus.UndefinedArgumentError: return "Undefined argument";
case IModelHubStatus.InvalidArgumentError: return "Invalid argument";
case IModelHubStatus.MissingDownloadUrlError: return "Missing download url";
case IModelHubStatus.NotSupportedInBrowser: return "Not supported in browser";
case IModelHubStatus.FileHandlerNotSet: return "File handler is not set";
case IModelHubStatus.FileNotFound: return "File not found";
case GeoServiceStatus.NoGeoLocation: return "No GeoLocation";
case GeoServiceStatus.OutOfUsefulRange: return "Out of useful range";
case GeoServiceStatus.OutOfMathematicalDomain: return "Out of mathematical domain";
case GeoServiceStatus.NoDatumConverter: return "No datum converter";
case GeoServiceStatus.VerticalDatumConvertError: return "Vertical datum convert error";
case GeoServiceStatus.CSMapError: return "CSMap error";
case GeoServiceStatus.Pending: return "Pending"; // eslint-disable-line @typescript-eslint/no-deprecated
case RealityDataStatus.InvalidData: return "Invalid or unknown data";
case BeSQL