1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Broadcast error messages within Cluster.getConnectionStatus

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-01-17 09:09:23 -05:00
parent b2ac628d05
commit 7a994749b4

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);
} }