import type { RadarResponse } from './http'; /** base error class for all Radar SDK errors */ export declare abstract class RadarError extends Error { /** legacy status code string (e.g. `'ERROR_PUBLISHABLE_KEY'`) */ abstract readonly status: string; abstract readonly name: string; constructor(message: string); } /** thrown when a publishable key is missing or invalid (e.g. secret key used) */ export declare class RadarPublishableKeyError extends RadarError { readonly name = "RadarPublishableKeyError"; readonly status = "ERROR_PUBLISHABLE_KEY"; constructor(message: string); } /** thrown when the device location cannot be determined */ export declare class RadarLocationError extends RadarError { readonly name = "RadarLocationError"; readonly status = "ERROR_LOCATION"; constructor(message: string); } /** thrown when location permissions are denied by the browser */ export declare class RadarPermissionsError extends RadarError { readonly name = "RadarPermissionsError"; readonly status = "ERROR_PERMISSIONS"; constructor(message: string); } /** thrown on HTTP 400 Bad Request responses */ export declare class RadarBadRequestError extends RadarError { readonly name = "RadarBadRequestError"; readonly status = "ERROR_BAD_REQUEST"; readonly code = 400; readonly response?: RadarResponse; constructor(response?: RadarResponse); } /** thrown on HTTP 401 Unauthorized responses */ export declare class RadarUnauthorizedError extends RadarError { readonly name = "RadarUnauthorizedError"; readonly status = "ERROR_UNAUTHORIZED"; readonly code = 401; readonly response?: RadarResponse; constructor(response?: RadarResponse); } /** thrown on HTTP 402 Payment Required responses */ export declare class RadarPaymentRequiredError extends RadarError { readonly name = "RadarPaymentRequiredError"; readonly status = "ERROR_PAYMENT_REQUIRED"; readonly code = 402; readonly response?: RadarResponse; constructor(response?: RadarResponse); } /** thrown on HTTP 403 Forbidden responses */ export declare class RadarForbiddenError extends RadarError { readonly name = "RadarForbiddenError"; readonly status = "ERROR_FORBIDDEN"; readonly code = 403; readonly response?: RadarResponse; constructor(response?: RadarResponse); } /** thrown on HTTP 404 Not Found responses */ export declare class RadarNotFoundError extends RadarError { readonly name = "RadarNotFoundError"; readonly status = "ERROR_NOT_FOUND"; readonly code = 404; readonly response?: RadarResponse; constructor(response?: RadarResponse); } /** thrown on HTTP 429 Rate Limit responses */ export declare class RadarRateLimitError extends RadarError { readonly name = "RadarRateLimitError"; readonly status = "ERROR_RATE_LIMIT"; readonly code = 429; readonly response?: RadarResponse; /** rate limit type from the API response (e.g. `'hourly'`) */ readonly type?: string; constructor(response?: RadarResponse); } /** thrown on HTTP 5xx server errors */ export declare class RadarServerError extends RadarError { readonly name = "RadarServerError"; readonly status = "ERROR_SERVER"; readonly response?: RadarResponse; constructor(response?: RadarResponse); } /** thrown when a request times out or the network is unavailable */ export declare class RadarNetworkError extends RadarError { readonly name = "RadarNetworkError"; readonly status = "ERROR_NETWORK"; constructor(); } /** thrown for unexpected/unclassified errors */ export declare class RadarUnknownError extends RadarError { readonly name = "RadarUnknownError"; readonly status = "ERROR_UNKNOWN"; readonly response?: RadarResponse; constructor(response?: RadarResponse); }