/** * @nahisaho/yata-scale - Error Classes * * Hierarchical error types for yata-scale operations */ /** * Base error class for all yata-scale errors */ export declare class YataScaleError extends Error { readonly code: string; readonly cause?: Error | undefined; readonly timestamp: Date; constructor(message: string, code: string, cause?: Error | undefined); toJSON(): Record; } /** * Shard-related error */ export declare class ShardError extends YataScaleError { readonly shardId: string; constructor(message: string, shardId: string, cause?: Error); toJSON(): Record; } /** * Shard not found error */ export declare class ShardNotFoundError extends ShardError { constructor(shardId: string); } /** * Shard unavailable error */ export declare class ShardUnavailableError extends ShardError { constructor(shardId: string, cause?: Error); } /** * Shard capacity exceeded error */ export declare class ShardCapacityExceededError extends ShardError { readonly currentSize: number; readonly maxCapacity: number; constructor(shardId: string, currentSize: number, maxCapacity: number); toJSON(): Record; } /** * Rebalance error */ export declare class RebalanceError extends YataScaleError { readonly jobId: string; constructor(message: string, jobId: string, cause?: Error); toJSON(): Record; } /** * Index-related error */ export declare class IndexError extends YataScaleError { readonly indexName: string; constructor(message: string, indexName: string, cause?: Error); toJSON(): Record; } /** * Index not found error */ export declare class IndexNotFoundError extends IndexError { constructor(indexName: string); } /** * Index corrupted error */ export declare class IndexCorruptedError extends IndexError { constructor(indexName: string, details?: string); } /** * Duplicate key error */ export declare class DuplicateKeyError extends IndexError { readonly key: string; constructor(indexName: string, key: string); toJSON(): Record; } /** * Cache-related error */ export declare class CacheError extends YataScaleError { constructor(message: string, cause?: Error); } /** * Cache miss error (when strict mode requires hit) */ export declare class CacheMissError extends CacheError { readonly key: string; constructor(key: string); toJSON(): Record; } /** * Cache full error */ export declare class CacheFullError extends CacheError { readonly tier: string; readonly currentSize: number; readonly maxSize: number; constructor(tier: string, currentSize: number, maxSize: number); toJSON(): Record; } /** * Query-related error */ export declare class QueryError extends YataScaleError { constructor(message: string, cause?: Error); } /** * Query timeout error */ export declare class QueryTimeoutError extends QueryError { readonly timeoutMs: number; constructor(timeoutMs: number); toJSON(): Record; } /** * Invalid query error */ export declare class InvalidQueryError extends QueryError { readonly query: unknown; constructor(message: string, query: unknown); toJSON(): Record; } /** * Query execution error */ export declare class QueryExecutionError extends QueryError { readonly step: string; constructor(message: string, step: string, cause?: Error); toJSON(): Record; } /** * Sync-related error */ export declare class SyncError extends YataScaleError { constructor(message: string, cause?: Error); } /** * Conflict error */ export declare class ConflictError extends SyncError { readonly entityId: string; readonly localVersion: number; readonly remoteVersion: number; constructor(entityId: string, localVersion: number, remoteVersion: number); toJSON(): Record; } /** * Sync connection error */ export declare class SyncConnectionError extends SyncError { readonly remote: string; constructor(remote: string, cause?: Error); toJSON(): Record; } /** * WAL error */ export declare class WALError extends SyncError { constructor(message: string, cause?: Error); } /** * Storage-related error */ export declare class StorageError extends YataScaleError { constructor(message: string, cause?: Error); } /** * Storage I/O error */ export declare class StorageIOError extends StorageError { readonly path: string; readonly operation: 'read' | 'write' | 'delete'; constructor(path: string, operation: 'read' | 'write' | 'delete', cause?: Error); toJSON(): Record; } /** * Storage corruption error */ export declare class StorageCorruptionError extends StorageError { readonly path: string; constructor(path: string, details?: string); toJSON(): Record; } /** * Compaction error */ export declare class CompactionError extends StorageError { constructor(message: string, cause?: Error); } /** * Entity-related error */ export declare class EntityError extends YataScaleError { readonly entityId: string; constructor(message: string, entityId: string, cause?: Error); toJSON(): Record; } /** * Entity not found error */ export declare class EntityNotFoundError extends EntityError { constructor(entityId: string); } /** * Entity already exists error */ export declare class EntityAlreadyExistsError extends EntityError { constructor(entityId: string); } /** * Entity validation error */ export declare class EntityValidationError extends EntityError { readonly violations: string[]; constructor(entityId: string, violations: string[]); toJSON(): Record; } /** * Configuration error */ export declare class ConfigurationError extends YataScaleError { constructor(message: string); } /** * Invalid configuration error */ export declare class InvalidConfigurationError extends ConfigurationError { readonly field: string; readonly reason: string; constructor(field: string, reason: string); toJSON(): Record; } /** * Initialization error */ export declare class InitializationError extends YataScaleError { constructor(message: string, cause?: Error); } /** * Already initialized error */ export declare class AlreadyInitializedError extends InitializationError { constructor(); } /** * Not initialized error */ export declare class NotInitializedError extends InitializationError { constructor(); } //# sourceMappingURL=errors.d.ts.map