import { FxError } from "@microsoft/teamsfx-api"; /** * component error * store more information in FxError's innerError property for telemetry, logging and debugging * * @property name name of error, for classification * @property message always save error message in english * @property errorType which type of error will throw to fx-core * @property displayMessage the message show to user, always save as localized message * @property helpLink link to help page, mostly no use * @property detail detail error message, http response, console output, etc.. */ export declare class BaseComponentInnerError extends Error { source: string; errorType: "UserError" | "SystemError"; helpLink?: string; displayMessage?: string; suggestionKey?: string[]; detail?: string; innerError?: Error; constructor(source: string, errorType: "UserError" | "SystemError", name: string, messageKey?: string, messageParams?: string[], suggestionKey?: string[], detail?: string, helpLink?: string, innerError?: Error); toFxError(): FxError; /** * The suggestion message will be localized and add 'Suggestions:' by default * the final method will be like: * 'Error message. Suggestions: suggestion message' * can be overwritten by subclasses * @protected */ protected toDisplayMessage(): string; static unknownError(source: string, error: unknown): BaseComponentInnerError; } /** * component call external api error */ export declare class ExternalApiCallError extends BaseComponentInnerError { statusCode: number; constructor(source: string, name: string, message: string, statusCode: number, messageParams?: string[], suggestionKey?: string[], detail?: string, helpLink?: string); static getAzureCredentialError(source: string, error?: unknown): ExternalApiCallError; static getAzureCredentialRemoteError(source: string, error?: unknown): ExternalApiCallError; static getSasTokenError(source: string, detail?: string): ExternalApiCallError; static getSasTokenRemoteError(source: string, detail?: string): ExternalApiCallError; } /** * parameter in environmental error or user input error */ export declare class PrerequisiteError extends BaseComponentInnerError { constructor(source: string, name: string, messageKey: string, messageParams: string[] | undefined, suggestionKey?: string[], helpLink?: string); static somethingIllegal(source: string, name: string, messageKey: string, messageParams?: string[], helpLink?: string): PrerequisiteError; static somethingMissing(source: string, name: string, helpLink?: string): PrerequisiteError; static folderNotExists(source: string, name: string, helpLink?: string): PrerequisiteError; static toCamel(name: string): string; } //# sourceMappingURL=componentError.d.ts.map