From 7060108a8bc2004835d264527eafe78ff899be76 Mon Sep 17 00:00:00 2001 From: Marc-Andre Ferland Date: Mon, 10 Oct 2022 22:27:49 -0400 Subject: [PATCH] Don't hide errors if they are unexpected. --- ui/media/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/media/main.js b/ui/media/main.js index e92afc81..864d6c4a 100644 --- a/ui/media/main.js +++ b/ui/media/main.js @@ -518,7 +518,11 @@ async function doMakeImage(task) { } } } catch (e) { - finalJSON += jsonStr + if (e instanceof SyntaxError && e.message.startsWith('JSON.parse')) { + finalJSON += jsonStr + } else { + throw e + } } prevTime = t