/** * Custom error classes for Spinta API errors */ import type { SpintaErrorResponse } from './types.js'; /** * Base error class for Spinta-related errors */ export declare class SpintaError extends Error { readonly status: number; readonly body: SpintaErrorResponse | null; constructor(message: string, status: number, body?: SpintaErrorResponse | null); } /** * Authentication error (401/403) */ export declare class AuthenticationError extends SpintaError { constructor(message?: string, status?: number, body?: SpintaErrorResponse | null); } /** * Resource not found error (404) */ export declare class NotFoundError extends SpintaError { constructor(message?: string, body?: SpintaErrorResponse | null); } /** * Validation error (400) - usually bad query parameters */ export declare class ValidationError extends SpintaError { constructor(message?: string, body?: SpintaErrorResponse | null); } /** * Parse error response body and throw appropriate error */ export declare function handleErrorResponse(response: Response): Promise; //# sourceMappingURL=errors.d.ts.map