From b799d0182fe71e99c4d66ad047c2b07268dfbf4d Mon Sep 17 00:00:00 2001 From: Chris Brown <1731074+ccbrown@users.noreply.github.com> Date: Sat, 28 Jun 2025 11:02:47 -0500 Subject: [PATCH] handle deleted integrations gracefully in report generation --- backend/app/report.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/app/report.go b/backend/app/report.go index 068660c..8c8120a 100644 --- a/backend/app/report.go +++ b/backend/app/report.go @@ -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 } output, err := a.sts.AssumeRole(ctx, &sts.AssumeRoleInput{