Skip to content

Commit 0c98271

Browse files
committed
Fix golangci-lint 'ineffassign,staticcheck(SA4006),wastedassign'.
1 parent 88825b5 commit 0c98271

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

internal/service/wafv2/web_acl_data_source.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,17 @@ func dataSourceWebACLRead(ctx context.Context, d *schema.ResourceData, meta any)
108108
return !lastPage
109109
})
110110

111+
if err != nil {
112+
return sdkdiag.AppendErrorf(diags, "list WAFv2 WebACLs: %s", err)
113+
}
114+
111115
if foundWebACL.Id == nil {
112116
return sdkdiag.AppendErrorf(diags, "WAFv2 WebACL not found for name: %s", name)
113117
}
114118

115119
// Get full WebACL details using GetWebACL
116120
getResp, err := findWebACLByThreePartKey(ctx, conn, aws.ToString(foundWebACL.Id), aws.ToString(foundWebACL.Name), string(scope))
121+
117122
if err != nil {
118123
return sdkdiag.AppendErrorf(diags, "reading WAFv2 WebACL (%s): %s", aws.ToString(foundWebACL.Id), err)
119124
}

0 commit comments

Comments
 (0)