import type { Commands } from "./messaging"; /** * Represents an error whose message is intended to be presented to end users. */ export declare class UserFriendlyError extends Error { readonly originalError: Error; readonly messageArgs: unknown[]; constructor(error: Error, message: string, ...args: unknown[]); } /** * 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: unknown, message: string): unknown; /** * 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. * @param commands The command registry. */ export declare function presentUserError(e: unknown, commands: Commands): Promise;