diff --git a/src/datasource-zabbix/zabbix/connectors/zabbix_api/zabbixAPIConnector.js b/src/datasource-zabbix/zabbix/connectors/zabbix_api/zabbixAPIConnector.js index f9229bf..ac449e5 100644 --- a/src/datasource-zabbix/zabbix/connectors/zabbix_api/zabbixAPIConnector.js +++ b/src/datasource-zabbix/zabbix/connectors/zabbix_api/zabbixAPIConnector.js @@ -40,26 +40,10 @@ export class ZabbixAPIConnector { ////////////////////////// request(method, params) { - this.tsdbRequest(method, params).then(response => { + return this.tsdbRequest(method, params).then(response => { const result = this.handleTsdbResponse(response); - console.log(result); - }); - - return this.zabbixAPICore.request(this.url, method, params, this.requestOptions, this.auth) - .catch(error => { - if (isNotAuthorized(error.data)) { - // Handle auth errors - this.loginErrorCount++; - if (this.loginErrorCount > this.maxLoginAttempts) { - this.loginErrorCount = 0; - return null; - } else { - return this.loginOnce() - .then(() => this.request(method, params)); - } - } else { - return Promise.reject(error); - } + + return result; }); }