mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-07-26 23:03:55 +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;
|
let data = records?.[0]?.data;
|
||||||
if (!success || !data || !data.nodelist?.length) {
|
if (!success || !data || !data.nodelist?.length) {
|
||||||
let error = operation.getError();
|
let error = operation.getError();
|
||||||
|
if (error) {
|
||||||
let msg = Proxmox.Utils.getResponseErrorMessage(error);
|
let msg = Proxmox.Utils.getResponseErrorMessage(error);
|
||||||
if (msg !== 'node is not in a cluster, no join info available! (500)') {
|
if (error.status !== 424 && !msg.match(/node is not in a cluster/i)) {
|
||||||
// show the real message
|
// an actual error, not just the "not in a cluster one", so show it!
|
||||||
Proxmox.Utils.setErrorMask(this.getView(), msg);
|
Proxmox.Utils.setErrorMask(this.getView(), error);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
vm.set('totem', {});
|
vm.set('totem', {});
|
||||||
vm.set('isInCluster', false);
|
vm.set('isInCluster', false);
|
||||||
|
Loading…
Reference in New Issue
Block a user