From 196a73ec7282467992601811e4e980efc8d0670c Mon Sep 17 00:00:00 2001 From: beejeebus Date: Fri, 14 Feb 2025 08:25:26 -0500 Subject: [PATCH] influxdb - fix nil pointer usage - fixes #100723 (#100724) When introducing errorsource over in: https://github.com/grafana/grafana/pull/99900 I introduced a bug - trying to use a http response with a non-nil error. In that case, the response is nil, so code panics. This PR removes that check. --- pkg/tsdb/influxdb/influxql/influxql.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/tsdb/influxdb/influxql/influxql.go b/pkg/tsdb/influxdb/influxql/influxql.go index 912a7abe2f4..e7de3267e6f 100644 --- a/pkg/tsdb/influxdb/influxql/influxql.go +++ b/pkg/tsdb/influxdb/influxql/influxql.go @@ -176,8 +176,7 @@ func execute(ctx context.Context, tracer trace.Tracer, dsInfo *models.Datasource res, err := dsInfo.HTTPClient.Do(request) if err != nil { return backend.DataResponse{ - Error: err, - ErrorSource: backend.ErrorSourceFromHTTPStatus(res.StatusCode), + Error: err, }, err } defer func() {