mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Adding error logs when unexpected error from gateway
This commit is contained in:
parent
54d25522ba
commit
139bc99cc7
@ -259,6 +259,10 @@ deviceModule = function () {
|
|||||||
}
|
}
|
||||||
return serviceInvokers.XMLHttp.get(
|
return serviceInvokers.XMLHttp.get(
|
||||||
url, function (responsePayload) {
|
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"];
|
return parse(responsePayload["responseText"])["count"];
|
||||||
},
|
},
|
||||||
function (responsePayload) {
|
function (responsePayload) {
|
||||||
|
|||||||
@ -47,7 +47,8 @@ var LANGUAGE_US = "en_US";
|
|||||||
|
|
||||||
var VENDOR_APPLE = "Apple";
|
var VENDOR_APPLE = "Apple";
|
||||||
var ERRORS = {
|
var ERRORS = {
|
||||||
"USER_NOT_FOUND": "USER_NOT_FOUND"
|
"USER_NOT_FOUND": "USER_NOT_FOUND",
|
||||||
|
"UNKNOWN_ERROR": "Unknown Error"
|
||||||
};
|
};
|
||||||
|
|
||||||
var USER_STORES_NOISY_CHAR = "\"";
|
var USER_STORES_NOISY_CHAR = "\"";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user