diff options
author | Vyacheslav Khaliev <vyacheslav.khaliev@zabbix.com> | 2022-06-03 09:27:15 +0300 |
---|---|---|
committer | Vyacheslav Khaliev <vyacheslav.khaliev@zabbix.com> | 2022-06-03 09:27:15 +0300 |
commit | 008b8e8cafe2d77f4330fcc93d9f7b815b0a8ff1 (patch) | |
tree | 9b57935b1dd9f8fedabbe708e8c9f654f921a0e7 /templates/san | |
parent | da8848c1e25d23d1ed0420ed593a208998bbeea3 (diff) |
.........T [ZBXNEXT-7632] updated HPE Primera template
Diffstat (limited to 'templates/san')
-rw-r--r-- | templates/san/hpe_primera_http/template_san_hpe_primera_http.yaml | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/templates/san/hpe_primera_http/template_san_hpe_primera_http.yaml b/templates/san/hpe_primera_http/template_san_hpe_primera_http.yaml index 02724299e20..7b92c4e1dd5 100644 --- a/templates/san/hpe_primera_http/template_san_hpe_primera_http.yaml +++ b/templates/san/hpe_primera_http/template_san_hpe_primera_http.yaml @@ -154,12 +154,11 @@ zabbix_export: } if (raw_data !== null) { - if (typeof raw_data === 'object') { + try { return JSON.parse(raw_data); } - else { - throw 'Received data is not an object.'; - } + catch (error) { + throw 'Failed to parse response received from device API.'; } else { throw 'No data received by ' + method + ' request.'; |