Adding error logs when unexpected error from gateway

merge-requests/1/head
Rasika Perera 8 years ago
parent 54d25522ba
commit 139bc99cc7

@ -259,6 +259,10 @@ deviceModule = function () {
}
return serviceInvokers.XMLHttp.get(
url, function (responsePayload) {
if(!responsePayload["responseText"]){
log.error("Error while fetching device count. API `" + url + "` returns HTTP: " + responsePayload["status"]);
throw constants["ERRORS"]["UNKNOWN_ERROR"];
}
return parse(responsePayload["responseText"])["count"];
},
function (responsePayload) {

@ -47,7 +47,8 @@ var LANGUAGE_US = "en_US";
var VENDOR_APPLE = "Apple";
var ERRORS = {
"USER_NOT_FOUND": "USER_NOT_FOUND"
"USER_NOT_FOUND": "USER_NOT_FOUND",
"UNKNOWN_ERROR": "Unknown Error"
};
var USER_STORES_NOISY_CHAR = "\"";

Loading…
Cancel
Save