import { ErrorWithData } from "../types/types"; /** * Handles errors from API calls, providing standardized error handling across services * @param error The error object from the API call * @param context Optional context description for logging * @returns A standardized error object */ export declare function handleApiError(error: unknown, context?: string): Error; /** * Maps an HTTP error status from a URL the caller supplied, such as * tomtom-data-viz's data_url. The server behind it is not TomTom's, so unlike * fromApiStatus the messages name neither the TomTom API nor the API key. * @param status The HTTP status the URL answered with * @param cause The error the request failed with */ export declare function fromUrlStatus(status: number, cause: unknown): ErrorWithData; /** * The JSON body a tool returns when it fails. For a caller error, the values * that were wrong ride along in details, since the message names none of them. */ export declare function toErrorPayload(error: Error): { error: string; details?: Record; }; //# sourceMappingURL=apiErrorHandler.d.ts.map