From 148d688d43bd23db4f43956a80b0880ba0d6ce55 Mon Sep 17 00:00:00 2001 From: xCyanGrizzly Date: Fri, 31 Jul 2026 05:25:16 +0200 Subject: [PATCH] fix(worker): fall through to download pipeline on any forward-path throw --- worker/src/worker.ts | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/worker/src/worker.ts b/worker/src/worker.ts index a704429..0eb9d66 100644 --- a/worker/src/worker.ts +++ b/worker/src/worker.ts @@ -1770,16 +1770,23 @@ async function processOneArchiveSet( // falls through into the existing download pipeline below so indexing // completeness never regresses. if (channel.allowsForwarding === true) { - const forwardResult = await tryForwardArchiveSet( - ctx, archiveSet, setIdx, totalSets, previewMatches, ingestionRunId - ); - if (forwardResult !== undefined) { - return forwardResult; + try { + const forwardResult = await tryForwardArchiveSet( + ctx, archiveSet, setIdx, totalSets, previewMatches, ingestionRunId + ); + if (forwardResult !== undefined) { + return forwardResult; + } + accountLog.info( + { fileName: archiveName }, + "Forward path unavailable for this archive — falling back to download+reupload" + ); + } catch (forwardPathErr) { + accountLog.warn( + { err: forwardPathErr, fileName: archiveName }, + "Forward path threw unexpectedly — falling back to download+reupload" + ); } - accountLog.info( - { fileName: archiveName }, - "Forward path unavailable for this archive — falling back to download+reupload" - ); } const tempPaths: string[] = [];