Cloudwatch Logs: Fix bug where we did not return errors to user (#87190)

This commit is contained in:
Sarah Zinger
2024-06-04 08:43:36 -04:00
committed by GitHub
parent 2090270a13
commit 4d002d85f9
10 changed files with 701 additions and 767 deletions
+3 -7
View File
@@ -57,14 +57,10 @@ func (e *cloudWatchExecutor) executeLogActions(ctx context.Context, req *backend
eg.Go(func() error {
dataframe, err := e.executeLogAction(ectx, logsQuery, query, req.PluginContext)
if err != nil {
var AWSError *AWSError
if errors.As(err, &AWSError) {
resultChan <- backend.Responses{
query.RefID: backend.DataResponse{Frames: data.Frames{}, Error: AWSError},
}
return nil
resultChan <- backend.Responses{
query.RefID: backend.DataResponse{Frames: data.Frames{}, Error: err},
}
return err
return nil
}
groupedFrames, err := groupResponseFrame(dataframe, logsQuery.StatsGroups)