Commit 2782ad09 by bergquist

plugins: only set error if errorstring is not empty

parent cd2161e7
...@@ -71,8 +71,11 @@ func (tw *DatasourcePluginWrapper) Query(ctx context.Context, ds *models.DataSou ...@@ -71,8 +71,11 @@ func (tw *DatasourcePluginWrapper) Query(ctx context.Context, ds *models.DataSou
qr := &tsdb.QueryResult{ qr := &tsdb.QueryResult{
RefId: r.RefId, RefId: r.RefId,
Series: []*tsdb.TimeSeries{}, Series: []*tsdb.TimeSeries{},
Error: errors.New(r.Error), }
ErrorString: r.Error,
if r.Error != "" {
qr.Error = errors.New(r.Error)
qr.ErrorString = r.Error
} }
for _, s := range r.GetSeries() { for _, s := range r.GetSeries() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment