backend plugins: log an error if parsing meta field failed

This commit is contained in:
Alexander Zobnin 2018-05-15 20:59:24 +03:00
parent 4533f22871
commit 214b9af5a3

View File

@ -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
}