From 455ac10b1fe0fda4c8a53fe5ab13e853f421f2d6 Mon Sep 17 00:00:00 2001 From: Zeyphros Date: Tue, 23 Jan 2024 23:06:41 +0100 Subject: [PATCH] Don't crash if getting files from importer fails --- src/lib/seedbox/Seedbox.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/lib/seedbox/Seedbox.js b/src/lib/seedbox/Seedbox.js index ed519ce..d27fb08 100644 --- a/src/lib/seedbox/Seedbox.js +++ b/src/lib/seedbox/Seedbox.js @@ -46,7 +46,14 @@ export default class Seedbox { while (toIndex.length > 0) { let current = toIndex.pop(); - const entries = await this.storageDriver.list(current); + let entries; + + try { + entries = await this.storageDriver.list(current); + } catch (e) { + console.log(`Failed to list files from remote: ${this.name}`, e); + continue; + } for (const entry of entries) { switch (entry.type) {