//#region src/errors/index.d.ts /** * Custom error classes for the Eclesia indexer * These provide better context and error tracking throughout the application */ /** * Base error class for all indexer errors * Extends Error with additional context fields */ declare class IndexerError extends Error { /** Error code for programmatic error handling */ readonly code: string; /** Additional context data for debugging */ readonly context?: Record; constructor(message: string, code?: string, context?: Record); } /** * Configuration-related errors * Thrown when indexer configuration is invalid or missing */ declare class ConfigurationError extends IndexerError { constructor(message: string, context?: Record); } /** * RPC connection and communication errors * Thrown when RPC calls fail or connections are lost */ declare class RPCError extends IndexerError { /** The RPC endpoint that failed */ readonly endpoint?: string; /** The height being queried when error occurred */ readonly height?: number; constructor(message: string, endpoint?: string, height?: number, context?: Record); } /** * Database operation errors * Thrown when database queries or transactions fail */ declare class DatabaseError extends IndexerError { /** The SQL query that failed */ readonly query?: string; /** The operation that failed (e.g., "BEGIN", "COMMIT", "ROLLBACK") */ readonly operation?: string; constructor(message: string, operation?: string, query?: string, context?: Record); } /** * Block processing errors * Thrown when block data is invalid or processing fails */ declare class BlockProcessingError extends IndexerError { /** The height of the block that failed to process */ readonly height: number; constructor(message: string, height: number, context?: Record); } /** * Module initialization errors * Thrown when indexing modules fail to initialize */ declare class ModuleError extends IndexerError { /** The name of the module that failed */ readonly moduleName: string; constructor(message: string, moduleName: string, context?: Record); } /** * Genesis processing errors * Thrown when genesis file parsing or processing fails */ declare class GenesisError extends IndexerError { /** Path to the genesis file */ readonly genesisPath?: string; constructor(message: string, genesisPath?: string, context?: Record); } //#endregion export { BlockProcessingError, ConfigurationError, DatabaseError, GenesisError, IndexerError, ModuleError, RPCError }; //# sourceMappingURL=index.d.mts.map