/** * Error types for the Yahoo Fantasy Sports API wrapper * @module */ /** * Base error class for all Yahoo Fantasy Sports API errors */ export declare class YahooFantasyError extends Error { constructor(message: string); } /** * Error thrown when an API request fails */ export declare class YahooApiError extends YahooFantasyError { /** * HTTP status code */ readonly statusCode: number; /** * Raw response body */ readonly response?: unknown; /** * Yahoo API error code if available */ readonly errorCode?: string; /** * Parsed error description from XML response if available */ readonly errorDescription?: string; constructor(message: string, statusCode: number, response?: unknown, errorCode?: string); /** * Custom string representation for cleaner error logging */ toString(): string; } /** * Error thrown when authentication fails or token is invalid */ export declare class AuthenticationError extends YahooApiError { constructor(message: string, response?: unknown); } /** * Error thrown when rate limit is exceeded */ export declare class RateLimitError extends YahooApiError { /** * Time in seconds until rate limit resets */ readonly retryAfter?: number; constructor(message: string, retryAfter?: number, response?: unknown); } /** * Error thrown when a resource is not found */ export declare class NotFoundError extends YahooApiError { constructor(message: string, response?: unknown); } /** * Error thrown when the request is invalid */ export declare class ValidationError extends YahooFantasyError { /** * Field that failed validation */ readonly field?: string; /** * Expected value or format */ readonly expected?: string; /** * Actual value provided */ readonly actual?: unknown; constructor(message: string, field?: string, expected?: string, actual?: unknown); } /** * Error thrown when a network request fails */ export declare class NetworkError extends YahooFantasyError { /** * Original error that caused the failure */ readonly cause?: Error; constructor(message: string, cause?: Error); } /** * Error thrown when XML parsing fails */ export declare class ParseError extends YahooFantasyError { /** * Raw content that failed to parse */ readonly content?: string; constructor(message: string, content?: string); } /** * Error thrown when a configuration is invalid */ export declare class ConfigError extends YahooFantasyError { } /** * Type guard to check if an error is a YahooFantasyError */ export declare function isYahooFantasyError(error: unknown): error is YahooFantasyError; /** * Type guard to check if an error is a YahooApiError */ export declare function isYahooApiError(error: unknown): error is YahooApiError; /** * Type guard to check if an error is an AuthenticationError */ export declare function isAuthenticationError(error: unknown): error is AuthenticationError; /** * Type guard to check if an error is a RateLimitError */ export declare function isRateLimitError(error: unknown): error is RateLimitError; /** * Type guard to check if an error is a ValidationError */ export declare function isValidationError(error: unknown): error is ValidationError; //# sourceMappingURL=errors.d.ts.map