From 3fa1bdd574773e79f4861f6f3034fb9c4ec63ffe Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Fri, 17 May 2024 21:41:55 -0300 Subject: client: report uncaught runtime errors in search worker --- src/static/js/search-worker.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/static/js/search-worker.js') diff --git a/src/static/js/search-worker.js b/src/static/js/search-worker.js index 9a7827da..66c0cf2e 100644 --- a/src/static/js/search-worker.js +++ b/src/static/js/search-worker.js @@ -26,6 +26,7 @@ let status = null; let indexes = null; onmessage = handleWindowMessage; +onerror = handleRuntimeError; postStatus('alive'); Promise.all([ @@ -302,6 +303,10 @@ function importIndex(indexKey, indexData) { } } +function handleRuntimeError() { + postStatus('runtime-error'); +} + function handleWindowMessage(message) { switch (message.data.kind) { case 'action': -- cgit 1.3.0-6-gf8a5