From 344dd92c851f0167931cc58b10cebbc5ba1ff4a5 Mon Sep 17 00:00:00 2001 From: Marc-Andre Ferland Date: Sat, 22 Oct 2022 12:29:01 -0400 Subject: [PATCH] Improved checks on '/render' requests --- ui/media/js/main.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/media/js/main.js b/ui/media/js/main.js index e7fbe9ff..6eabc088 100644 --- a/ui/media/js/main.js +++ b/ui/media/js/main.js @@ -538,9 +538,16 @@ async function doMakeImage(task) { case 'pending': case 'running': case 'buffer': - case 'error': // Still valid, Update UI with error message + // Normal expected messages. break + case 'completed': + console.warn('Server %o render request %o completed unexpectedly', serverState, renderRequest) + break // Continue anyway to try to read cached result. + case 'error': + console.error('Server %o render request %o has failed', serverState, renderRequest) + break // Still valid, Update UI with error message case 'stopped': + console.log('Server %o render request %o was stopped', serverState, renderRequest) return false default: throw new Error('Unexpected server task state: ' + serverState.session || 'Undefined')