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 (#6964)

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-01-19 05:23:50 -08:00 committed by GitHub
parent 2cc7ad111a
commit 8009d96957
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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