diff --git a/app/utils/aws.ts b/app/utils/aws.ts index 422c4a071..d7b270138 100644 --- a/app/utils/aws.ts +++ b/app/utils/aws.ts @@ -609,6 +609,9 @@ export function processChunks( chunks.shift(); } } catch (e) { + // console.error("[Chunk Process Error]:", e); + // chunks.shift(); // Remove error chunk + // pendingChunk = null; // Reset pending chunk on error console.warn("Failed to process chunk, attempting recovery"); // Attempt to recover by processing the next chunk if (chunks.length > 1) { @@ -618,6 +621,7 @@ export function processChunks( // If this is the last chunk, throw to prevent data loss throw new Error("Failed to process final chunk"); } + } } return {