triggers panel: fix error handling
This commit is contained in:
@@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user