Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions backend/app/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ func (a *App) GenerateAWSCloudTrailReport(ctx context.Context, input GenerateAWS
integration, err := a.store.GetAWSIntegrationById(ctx, input.AWSIntegrationId)
if err != nil {
return nil, fmt.Errorf("failed to get aws integration: %w", err)
} else if integration == nil {
return nil, nil
Copy link

Copilot AI Jun 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returning a nil report and nil error can lead to silent failures or unexpected behavior downstream. Consider returning a descriptive error or an empty but valid report object to make this case explicit.

Suggested change
return nil, nil
return nil, fmt.Errorf("integration not found for AWSIntegrationId: %s", input.AWSIntegrationId)

Copilot uses AI. Check for mistakes.
}

output, err := a.sts.AssumeRole(ctx, &sts.AssumeRoleInput{
Expand Down
Loading