mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 08:23:12 +09:00
Improve error reporting when web_ui fails to load
Catch uncaught errors and display the error message on the page itself if bootstraping fails. This should prevent most cases of the of the web interface being stuck on "Loading web interface..." after an error was thrown and the loading failed.
This commit is contained in:
1 parent
f1edbd78cb
commit
1434ede2dc
2 files changed
+25
-13
No files matched your search
@@ -1,4 +1,5 @@
|
||||
/* eslint-disable arrow-body-style, no-console */
|
||||
import("@clusterio/web_ui").then(webUi => {
|
||||
return webUi.bootstrap();
|
||||
}).catch(console.error);
|
||||
declare function scriptError(err: any): void;
|
||||
import("@clusterio/web_ui")
|
||||
.then(webUi => webUi.bootstrap())
|
||||
.catch(scriptError)
|
||||
;
|
||||
Reference in new issue
Block a user