triggers panel: fix error handling

This commit is contained in:
Alexander Zobnin
2018-10-18 17:18:12 +03:00
parent 995811da43
commit a3f50904ce
3 changed files with 22 additions and 20 deletions

View File

@@ -47,9 +47,7 @@ export class ZabbixAPIConnector {
.then(() => this.request(method, params));
}
} else {
// Handle API errors
let message = error.data ? error.data : error.statusText;
return Promise.reject(message);
return Promise.reject(error);
}
});
}

View File

@@ -17,7 +17,7 @@ const REQUESTS_TO_CACHE = [
const REQUESTS_TO_BIND = [
'getHistory', 'getTrend', 'getMacros', 'getItemsByIDs', 'getEvents', 'getAlerts', 'getHostAlerts',
'getAcknowledges', 'getITService', 'getVersion', 'login'
'getAcknowledges', 'getITService', 'getVersion', 'login', 'acknowledgeEvent'
];
export class Zabbix {