/** * @fileoverview Block Fetch Error Types * * Error hierarchy for remote block fetching operations. * BlockFetchError is the base; PoolMismatchError, FetchTimeoutError, and PendingBlockError extend it. * * @see cross-node-eventual-consistency design, Error Handling section */ import { AvailabilityState } from '../enumerations/availabilityState'; /** * Base error for block fetch failures. * Contains the block ID and details of each node attempted. */ export declare class BlockFetchError extends Error { readonly blockId: string; readonly attemptedNodes: Array<{ nodeId: string; error?: string; }>; constructor(blockId: string, attemptedNodes: Array<{ nodeId: string; error?: string; }>, message: string); } /** * Thrown when a fetched block's pool metadata does not match the requested pool. * This indicates either data corruption or misconfiguration on the remote node. */ export declare class PoolMismatchError extends BlockFetchError { readonly expectedPoolId: string; readonly actualPoolId: string; constructor(blockId: string, expectedPoolId: string, actualPoolId: string); } /** * Thrown when a block fetch exceeds the configured timeout. */ export declare class FetchTimeoutError extends BlockFetchError { readonly timeoutMs: number; constructor(blockId: string, timeoutMs: number); } /** * Thrown when a block is known to exist remotely but has not yet been fetched locally. * Used with Available read concern to indicate a pending remote fetch. */ export declare class PendingBlockError extends Error { readonly blockId: string; readonly state: AvailabilityState; readonly knownLocations: string[]; constructor(blockId: string, state: AvailabilityState, knownLocations: string[]); } //# sourceMappingURL=blockFetchError.d.ts.map