From 39651cdf6f72e77494ffc8186925a3abf82df079 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 10 Jul 2020 15:38:02 +0000 Subject: [PATCH] --- ayanova/src/api/errorhandler.js | 3 +++ ayanova/src/api/gzmenu.js | 2 +- ayanova/src/api/notifypoll.js | 10 ++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/ayanova/src/api/errorhandler.js b/ayanova/src/api/errorhandler.js index 30649cde..15de11ff 100644 --- a/ayanova/src/api/errorhandler.js +++ b/ayanova/src/api/errorhandler.js @@ -67,6 +67,9 @@ export default { msg += "\ncolno: " + colno; } if (error) { + if (typeof error === "object") { + error = JSON.stringify(error); + } msg += "\nerror: " + error; } dealWithError(msg); diff --git a/ayanova/src/api/gzmenu.js b/ayanova/src/api/gzmenu.js index 99667df0..2e8716b9 100644 --- a/ayanova/src/api/gzmenu.js +++ b/ayanova/src/api/gzmenu.js @@ -39,7 +39,7 @@ export default { window.$gz.type.BizMetrics, window.$gz.type.Backup, window.$gz.type.Notification, - window.$gz.type.NotificationSubscription + window.$gz.type.NotifySubscription ]; vm.appBar.isMain = ctx.isMain; diff --git a/ayanova/src/api/notifypoll.js b/ayanova/src/api/notifypoll.js index db544188..9d6e102c 100644 --- a/ayanova/src/api/notifypoll.js +++ b/ayanova/src/api/notifypoll.js @@ -24,6 +24,16 @@ export default { if (pollingInterval > MAX_POLLING_INTERVAL) { pollingInterval = MAX_POLLING_INTERVAL; } + + //could be a expected issue such as server closed for maintenance + //so no need to freak out if that's the case + if (error.code) { + //is it a normal issue? + if (error.code == 2001) { + return; + } + } + //Nope, totally unexpected, alert the user window.$gz.errorHandler.handleGeneralError( "Error checking for notifications", "notifypoll",