aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workers
diff options
context:
space:
mode:
authorirobot <gh@noctis.pro>2025-06-21 02:46:56 -0700
committerGitHub <noreply@github.com>2025-06-21 10:46:56 +0100
commita16c542417f0e95b1ceae9b83d5b92ef109138bf (patch)
tree0852a078faddb56f2042fedfb95f5971e69bdf36 /apps/workers
parent88e4ea98c5f57fa4124285cb3eab75e2c04b9740 (diff)
downloadkarakeep-a16c542417f0e95b1ceae9b83d5b92ef109138bf.tar.zst
fix(workers): video downloader should log yt-dlp errors (#1624)
In the event that yt-dlp errors out, the error details should be logged. yt-dlp prints out the error message to stderr.
Diffstat (limited to 'apps/workers')
-rw-r--r--apps/workers/workers/videoWorker.ts9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/workers/workers/videoWorker.ts b/apps/workers/workers/videoWorker.ts
index 3fa3e49e..ca4168a6 100644
--- a/apps/workers/workers/videoWorker.ts
+++ b/apps/workers/workers/videoWorker.ts
@@ -127,9 +127,12 @@ async function runWorker(job: DequeuedJob<ZVideoRequest>) {
);
return;
}
- logger.error(
- `[VideoCrawler][${jobId}] Failed to download a file from "${url}" to "${assetPath}"`,
- );
+ const genericError = `[VideoCrawler][${jobId}] Failed to download a file from "${url}" to "${assetPath}"`;
+ if ("stderr" in err) {
+ logger.error(`${genericError}: ${err.stderr}`);
+ } else {
+ logger.error(genericError);
+ }
await deleteLeftOverAssetFile(jobId, videoAssetId);
return;
}