From a278e4ed6f3743dfe44edc05e91912a9cb4f9149 Mon Sep 17 00:00:00 2001 From: Temp-Simon Date: Tue, 25 Jul 2023 00:15:33 +0200 Subject: [PATCH] Added error handling for unhandled catch --- src/imageProcessor.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/imageProcessor.js b/src/imageProcessor.js index caf124d..e7cd2e9 100644 --- a/src/imageProcessor.js +++ b/src/imageProcessor.js @@ -100,7 +100,10 @@ export async function getImagesFromClipboardItems(items, folder_id) { const image = createImageDTO(folder_id, blob, data); return image; }); - return await Promise.all(imagePromises); + return await Promise.all(imagePromises).catch((err) => { + console.error("Error occured contact @simonsejse on GitHub: ", err); + return []; + }); } /**