From 214b9af5a3c706ef4400d15e4a04b2dcec93f1be Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Tue, 15 May 2018 20:59:24 +0300 Subject: [PATCH] backend plugins: log an error if parsing meta field failed --- pkg/plugins/datasource/wrapper/datasource_plugin_wrapper.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/plugins/datasource/wrapper/datasource_plugin_wrapper.go b/pkg/plugins/datasource/wrapper/datasource_plugin_wrapper.go index 6fe7ef7d79a..d2cd9f63cde 100644 --- a/pkg/plugins/datasource/wrapper/datasource_plugin_wrapper.go +++ b/pkg/plugins/datasource/wrapper/datasource_plugin_wrapper.go @@ -81,7 +81,10 @@ func (tw *DatasourcePluginWrapper) Query(ctx context.Context, ds *models.DataSou } if r.MetaJson != "" { - metaJson, _ := simplejson.NewJson([]byte(r.MetaJson)) + metaJson, err := simplejson.NewJson([]byte(r.MetaJson)) + if err != nil { + tw.logger.Error("Error parsing JSON Meta field: " + err.Error()) + } qr.Meta = metaJson }