From 1be4ed3c614a7b20e4c0e694d77994f571651ac8 Mon Sep 17 00:00:00 2001 From: srgooglo Date: Sun, 29 May 2022 18:25:15 +0200 Subject: [PATCH] emit initialization steps error on eventBus --- packages/app/src/App.jsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/app/src/App.jsx b/packages/app/src/App.jsx index 82f08f22..9aaabbd5 100644 --- a/packages/app/src/App.jsx +++ b/packages/app/src/App.jsx @@ -315,6 +315,8 @@ class App extends React.Component { try { await app.ApiController.attachAPIConnection() } catch (error) { + app.eventBus.emit("app.initialization.api_error", error) + throw { cause: "Cannot connect to API", details: error.message, @@ -325,6 +327,8 @@ class App extends React.Component { try { await this.__SessionInit() } catch (error) { + app.eventBus.emit("app.initialization.session_error", error) + throw { cause: "Cannot initialize session", details: error.message, @@ -335,6 +339,8 @@ class App extends React.Component { try { await this.__UserInit() } catch (error) { + app.eventBus.emit("app.initialization.user_error", error) + throw { cause: "Cannot initialize user data", details: error.message, @@ -345,6 +351,8 @@ class App extends React.Component { try { await this.__WSInit() } catch (error) { + app.eventBus.emit("app.initialization.ws_error", error) + throw { cause: "Cannot connect to WebSocket", details: error.message,