import { LocalizableError } from "@geocortex/api/LocalizableError"; import { Commands } from "./messaging"; import { TranslateOptions } from "./region"; export declare class UserFriendlyError extends LocalizableError { readonly originalError: Error; constructor(error: Error, message: string, ...args: any[]); get translateOptions(): TranslateOptions; } /** * Takes an error and converts it into a user facing error if it is one of the known error types. * To be used when calling upon a service to perform an operation that may return IdentifyErrors, * SearchErrors, or QueryErrors. * @param e The error to be converted * @param message The message to associate with any user friendly errors created */ export declare function convertUserErrors(e: Error, message: string): Error; /** * Takes an error and displays it to the user in a notification. * To be used when gracefully handling errors prompted by user actions, * particularly temporary errors that might be fixed by the user. * @param e The error to be displayed */ export declare function presentUserError(e: Error, commands: Commands): Promise;