Skip to content

Commit

Permalink
add check
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeah committed Mar 8, 2024
1 parent 66435fd commit 2bcdc4f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lambda/opt-out-import/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ func getAssumeRoleArn() (string, error) {
return "", fmt.Errorf("getAssumeRoleArn: Error connecting to parameter store: %w", err)
}

return *result.Parameter.Value, nil
arn := *result.Parameter.Value

if arn == "" {
return "", fmt.Errorf("getAssumeRoleArn: No value found for bfd-bucket-role-arn")
}

return arn, nil
}

func insertOptOutMetadata(db *sql.DB, optOutMetadata *OptOutFilenameMetadata) (OptOutFileEntity, error) {
Expand Down

0 comments on commit 2bcdc4f

Please sign in to comment.