Broadcast error messages within Cluster.getConnectionStatus

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2023-01-17 09:09:23 -05:00
1 parent b2ac628d05
commit 7a994749b4
1 file changed
+2
+2
View File
@@ -560,6 +560,8 @@ export class Cluster implements ClusterModel {
const message = String(error.error || error.message) || String(error); const message = String(error.error || error.message) || String(error);
this.broadcastConnectUpdate(message, true); this.broadcastConnectUpdate(message, true);
} else if (error instanceof Error || typeof error === "string") {
this.broadcastConnectUpdate(`${error}`, true);
} else { } else {
this.broadcastConnectUpdate("Unknown error has occurred", true); this.broadcastConnectUpdate("Unknown error has occurred", true);
} }