Cloudwatch: Unwrap errors - throw error from upstream (#36334)
* Unwrap errors - throw error from upstream * Fixes according to reviewer's comments * Fix linting * Remove unused code
This commit is contained in:
@@ -98,6 +98,12 @@ func (e *cloudWatchExecutor) executeTimeSeriesQuery(ctx context.Context, req *ba
|
||||
}
|
||||
|
||||
if err := eg.Wait(); err != nil {
|
||||
dataResponse := backend.DataResponse{
|
||||
Error: fmt.Errorf("metric request error: %q", err),
|
||||
}
|
||||
resultChan <- &responseWrapper{
|
||||
DataResponse: &dataResponse,
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
close(resultChan)
|
||||
|
||||
Reference in New Issue
Block a user