There are cases where we directly throw a string error
(particularly, when navigator.credentials.create() fails,
for example when trying to register the same WA device to
the same user twice), which would end up with the WA window
simply not closing before.
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
params,
});
} catch (response) {
- let error = response.result.message;
+ let error = response;
console.error(error); // for debugging if it's not displayable...
+ if (typeof error === "object") {
+ // in case it came from an api request:
+ error = error.result?.message;
+ }
+
Ext.Msg.alert(gettext('Error'), error);
}