type EventHintOrCaptureContext = { [key: string]: any; } | Function; export declare class AuthError extends Error { } export declare class InputError extends Error { body: string | undefined; constructor(message: string, body?: string | undefined); } export declare function captureException(exception: unknown, hint?: EventHintOrCaptureContext | undefined): Promise; export declare function captureExceptionSync(exception: unknown, hint?: EventHintOrCaptureContext | undefined): string; export declare function isErrnoException(value: unknown): value is NodeJS.ErrnoException; /** * Extracts an error message from an unknown value. * Returns the message if it's an Error object, otherwise returns undefined. * * @param error - The error object to extract message from * @returns The error message or undefined */ export declare function getErrorMessage(error: unknown): string | undefined; /** * Extracts an error message from an unknown value with a fallback. * Returns the message if it's an Error object, otherwise returns the fallback. * * @param error - The error object to extract message from * @param fallback - The fallback message if no error message is found * @returns The error message or fallback * * @example * getErrorMessageOr(error, 'Unknown error occurred') * // Returns: "ENOENT: no such file or directory" or "Unknown error occurred" */ export declare function getErrorMessageOr(error: unknown, fallback: string): string; /** * Extracts an error cause from an unknown value. * Returns the error message if available, otherwise UNKNOWN_ERROR. * Commonly used for creating CResult error causes. * * @param error - The error object to extract message from * @returns The error message or UNKNOWN_ERROR constant * * @example * return { ok: false, message: 'Operation failed', cause: getErrorCause(e) } */ export declare function getErrorCause(error: unknown): string; /** * Formats an error message with an optional error detail appended. * Extracts the message from an unknown error value and appends it * to the base message if available. * * @param baseMessage - The base message to display * @param error - The error object to extract message from * @returns Formatted message with error detail if available * * @example * formatErrorWithDetail('Failed to delete file', error) * // Returns: "Failed to delete file: ENOENT: no such file or directory" * // Or just: "Failed to delete file" if no error message */ export declare function formatErrorWithDetail(baseMessage: string, error: unknown): string; export {}; //# sourceMappingURL=errors.d.mts.map