Structure for a single failed operation with retry metadata.

export interface FailedOperation {
id: string; // Unique identifier, timestamp-based
type: FailedOperationType;
timestamp: number; // When it failed
retryCount: number; // How many times retried
lastRetryTimestamp: number | null; // When last retry was attempted
error: string; // Error message
errorCode?: string; // Error code if available
payload: unknown; // Operation-specific data
context?: Record<string, unknown>; // Additional context
permanentlyFailed?: boolean; // True if max retries exceeded and should not be retried
}
interface FailedOperation {
    id: string;
    type: FailedOperationType;
    timestamp: number;
    retryCount: number;
    lastRetryTimestamp: null | number;
    error: string;
    errorCode?: string;
    payload: unknown;
    context?: Record<string, unknown>;
    permanentlyFailed?: boolean;
}

Properties

id: string
timestamp: number
retryCount: number
lastRetryTimestamp: null | number
error: string
errorCode?: string
payload: unknown
context?: Record<string, unknown>
permanentlyFailed?: boolean