From bcb671db37d3f4f60d5ac300df8b686404e787ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 20 Feb 2024 14:37:34 +0100 Subject: [PATCH] fix(ui): handle vue.js app initialization error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- ui/web/src/main.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ui/web/src/main.ts b/ui/web/src/main.ts index 25f92db0..20712939 100644 --- a/ui/web/src/main.ts +++ b/ui/web/src/main.ts @@ -45,11 +45,16 @@ fetch('/config.json') response .json() .then(config => { - initializeApp(config) + try { + initializeApp(config) + } catch (error) { + // TODO: add code for UI notifications or other error handling logic + console.error('Error at initializing the app:', error) + } }) .catch(error => { // TODO: add code for UI notifications or other error handling logic - console.error('Error at app configuration JSON deserialization:', error) + console.error('Error at deserializing JSON app configuration:', error) }) }) .catch(error => { -- 2.34.1