/** @packageDocumentation * @module iModelHubClient */ import { GetMetaDataFunction, HttpStatus, IModelHubStatus, LogFunction } from "@bentley/bentleyjs-core"; import { ResponseError, WsgError } from "@bentley/itwin-client"; /** * Error returned from iModelHub service. * @public */ export declare class IModelHubError extends WsgError { /** Extended data of the error. */ data: any; private static _idPrefix; /** @internal */ constructor(errorNumber: number | HttpStatus, message?: string, getMetaData?: GetMetaDataFunction); /** * Get IModelHubStatus from the string value returned by the service. * @param error Error id returned by the service. * @returns IModelHubStatus id */ private static getErrorId; /** * Check whether error could have extended data. * @param id Id of the error. * @returns True if service can return extended data for this error id. */ private static requiresExtendedData; /** * Make extended data available publically. */ private copyExtendedData; /** * Create IModelHubError from id. * @param id Id of the error. * @param message Message for the error. * @returns Created error. * @internal */ static fromId(id: IModelHubStatus, message: string): IModelHubError; /** * Attempt to parse IModelHubError from server response. * @param response Response from the server. * @returns Parsed error. * @internal */ static parse(response: any, log?: boolean): ResponseError; /** * Decides whether request should be retried or not. * @param error Error returned by request * @param response Response returned by request * @internal */ static shouldRetry(error: any, response: any): boolean; /** * Get log function. * @internal */ getLogLevel(): LogFunction; /** * Logs this error. * @internal */ log(): void; } /** * Errors for incorrect iModelHub requests. * @public */ export declare class IModelHubClientError extends IModelHubError { /** Creates IModelHubClientError from id. * @param id Id of the error. * @param message Message for the error. * @returns Created error. * @internal */ static fromId(id: IModelHubStatus, message: string): IModelHubClientError; /** Create error for undefined arguments being passed. * @param argumentName Undefined argument name * @returns Created error. * @internal */ static undefinedArgument(argumentName: string): IModelHubClientError; /** Create error for invalid arguments being passed. * @param argumentName Invalid argument name * @returns Created error. * @internal */ static invalidArgument(argumentName: string): IModelHubClientError; /** Create error for arguments being passed that are missing download URL. * @param argumentName Argument name * @returns Created error. * @internal */ static missingDownloadUrl(argumentName: string): IModelHubClientError; /** Create error for seed file initialization timing out. * @returns Created error. * @internal */ static initializationTimeout(): IModelHubClientError; /** Create error for incompatible operation being used in browser. * @returns Created error. * @internal */ static browser(): IModelHubClientError; /** Create error for incompatible operation being used in browser. * @returns Created error. * @internal */ static fileHandler(): IModelHubClientError; /** Create error for a missing file. * @returns Created error. * @internal */ static fileNotFound(): IModelHubClientError; } /** @internal */ export declare class ArgumentCheck { static defined(argumentName: string, argument?: any, allowEmpty?: boolean): void; static definedNumber(argumentName: string, argument?: number): void; static valid(argumentName: string, argument?: any): void; static validGuid(argumentName: string, argument?: string): void; static nonEmptyArray(argumentName: string, argument?: any[]): void; /** Check if Briefcase Id is valid. */ private static isBriefcaseIdValid; /** Check if Briefcase Id argument is valid. */ static validBriefcaseId(argumentName: string, argument?: number): void; private static isValidChangeSetId; static validChangeSetId(argumentName: string, argument?: string, allowEmpty?: boolean): void; } /** Class for aggregating errors from multiple requests. Only thrown when more than 1 error has occurred. * @public */ export declare class AggregateResponseError extends Error { /** Errors that happened over multiple requests. */ errors: ResponseError[]; } //# sourceMappingURL=Errors.d.ts.map