mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
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.
This commit is contained in:
@@ -176,8 +176,7 @@ func execute(ctx context.Context, tracer trace.Tracer, dsInfo *models.Datasource
|
|||||||
res, err := dsInfo.HTTPClient.Do(request)
|
res, err := dsInfo.HTTPClient.Do(request)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return backend.DataResponse{
|
return backend.DataResponse{
|
||||||
Error: err,
|
Error: err,
|
||||||
ErrorSource: backend.ErrorSourceFromHTTPStatus(res.StatusCode),
|
|
||||||
}, err
|
}, err
|
||||||
}
|
}
|
||||||
defer func() {
|
defer func() {
|
||||||
|
|||||||
Reference in New Issue
Block a user