diff --git a/src/datasource-zabbix/utils.ts b/src/datasource-zabbix/utils.ts index c5ba1e9..03f1c29 100644 --- a/src/datasource-zabbix/utils.ts +++ b/src/datasource-zabbix/utils.ts @@ -302,6 +302,9 @@ export function callOnce(func, promiseKeeper) { .then(result => { promiseKeeper = null; return result; + }).catch(err => { + promiseKeeper = null; + throw err; }) ); } diff --git a/src/datasource-zabbix/zabbix/proxy/cachingProxy.ts b/src/datasource-zabbix/zabbix/proxy/cachingProxy.ts index 5d11628..1fa78e2 100644 --- a/src/datasource-zabbix/zabbix/proxy/cachingProxy.ts +++ b/src/datasource-zabbix/zabbix/proxy/cachingProxy.ts @@ -65,6 +65,9 @@ function callOnce(func, promiseKeeper, funcScope) { .then(result => { promiseKeeper[hash] = null; return result; + }).catch(err => { + promiseKeeper[hash] = null; + throw err; }) ); }