import { AxiosError } from 'axios'; import { ReactNode } from 'react'; import { ErrorParams } from '@/types/models/error-types'; /** * Extracts the specific error code from an AxiosError response body. * Handles different backend error formats (OperationResult, ApiError, SpringError, GenericError). * @param error The AxiosError object. * @returns The extracted error code string, or an empty string if not found. * @public */ export declare function getApiErrorCode(error: AxiosError): string; /** @public */ export declare function getErrorMessage(error: AxiosError): ReactNode; export declare function handleApiError(error: AxiosError): void; /** @public */ export declare function handleCustomApiError(error: AxiosError, params?: ErrorParams): void; /** * Returns a plain string error message extracted from unknown API errors. * This is useful for inline UI errors where ReactNode notifications are not suitable. */ export declare function getApiErrorMessageString(error: unknown, fallbackMessage?: string): string;