Change handling of (token) errors due to #1706

This commit is contained in:
the-djmaze 2024-08-16 22:05:15 +02:00
parent 02ea6c4359
commit d00c953c88
25 changed files with 80 additions and 69 deletions

View file

@ -116,7 +116,7 @@ export class ContactsPopupView extends AbstractViewPopup {
Remote.request('ContactsDelete',
(iError, oData) => {
if (iError) {
alert(oData?.ErrorMessage || getNotification(iError));
alert(oData?.message || getNotification(iError));
} else {
const page = this.contactsPage();
if (page > Math.max(1, Math.ceil((this.contactsCount() - count) / CONTACTS_PER_PAGE))) {
@ -181,7 +181,7 @@ export class ContactsPopupView extends AbstractViewPopup {
Remote.request('ContactSave',
(iError, oData) => {
if (iError) {
alert(oData?.ErrorMessage || getNotification(iError));
alert(oData?.message || getNotification(iError));
} else if (oData.Result.ResultID) {
if (contact.id()) {
contact.id(oData.Result.ResultID);
@ -245,7 +245,7 @@ export class ContactsPopupView extends AbstractViewPopup {
if (iError) {
// console.error(data);
alert(data?.ErrorMessage || getNotification(iError));
alert(data?.message || getNotification(iError));
} else if (arrayLength(data.Result.List)) {
data.Result.List.forEach(item => {
item = ContactModel.reviveFromJson(item);