/** * Custom error classes for translation operations * Used for type-safe exception handling in repositories and handlers */ /** * Base error class for all translation-related errors */ export declare class TranslationError extends Error { readonly key: string; readonly status: number; constructor(key: string, status: number, message: string); } /** * Translation not found in backend (HTTP 404) * Should be synced to backend for translators to fill in */ export declare class TranslationNotFoundError extends TranslationError { constructor(key: string); } /** * Translation exists but is locked/not ready (HTTP 423) * Should NOT be synced to backend - will retry on next app start */ export declare class TranslationLockedError extends TranslationError { readonly retryAfter?: number | undefined; constructor(key: string, retryAfter?: number | undefined); } /** * Server error (HTTP 5xx) * Should trigger retry logic with exponential backoff */ export declare class ServerError extends TranslationError { constructor(key: string, status: number); } /** * Network error (timeout, DNS failure, CORS, etc.) * Not an HTTP error - network layer failed */ export declare class NetworkError extends Error { readonly cause?: unknown; constructor(message: string, cause?: unknown); } /** * Type guard to check if error is a TranslationError */ export declare function isTranslationError(error: unknown): error is TranslationError; /** * Type guard to check if error is retryable (5xx or network) */ export declare function isRetryableError(error: unknown): boolean; /** * Type guard to check if error is client error (4xx - not retryable) */ export declare function isClientError(error: unknown): boolean; //# sourceMappingURL=translation-errors.d.ts.map