mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-25 08:26:41 +00:00
ui: join info: rework error handling/checking for no-cluster
check if error is set before trying to access it and check for the new HTTP code a newer pve-cluster may return, and do a more fuzzy match for older ones. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
6152988ea6
commit
1b72acbf2f
@ -68,10 +68,12 @@ Ext.define('PVE.ClusterAdministration', {
|
||||
let data = records?.[0]?.data;
|
||||
if (!success || !data || !data.nodelist?.length) {
|
||||
let error = operation.getError();
|
||||
let msg = Proxmox.Utils.getResponseErrorMessage(error);
|
||||
if (msg !== 'node is not in a cluster, no join info available! (500)') {
|
||||
// show the real message
|
||||
Proxmox.Utils.setErrorMask(this.getView(), msg);
|
||||
if (error) {
|
||||
let msg = Proxmox.Utils.getResponseErrorMessage(error);
|
||||
if (error.status !== 424 && !msg.match(/node is not in a cluster/i)) {
|
||||
// an actual error, not just the "not in a cluster one", so show it!
|
||||
Proxmox.Utils.setErrorMask(this.getView(), error);
|
||||
}
|
||||
}
|
||||
vm.set('totem', {});
|
||||
vm.set('isInCluster', false);
|
||||
|
Loading…
Reference in New Issue
Block a user