Skip to content

Commit b34152e

Browse files
authored
Merge pull request #34567 from hashicorp/td-evidently_feature_error_check
r/aws_evidently_feature: check error correctly
2 parents cc558c7 + 58d3d31 commit b34152e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/service/evidently/feature.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ import (
1515
"github.com/aws/aws-sdk-go-v2/aws"
1616
"github.com/aws/aws-sdk-go-v2/service/evidently"
1717
awstypes "github.com/aws/aws-sdk-go-v2/service/evidently/types"
18-
"github.com/aws/aws-sdk-go/service/cloudwatchevidently"
19-
"github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2/tfawserr"
2018
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
2119
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
2220
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
2321
"github.com/hashicorp/terraform-provider-aws/internal/conns"
2422
"github.com/hashicorp/terraform-provider-aws/internal/enum"
23+
"github.com/hashicorp/terraform-provider-aws/internal/errs"
2524
"github.com/hashicorp/terraform-provider-aws/internal/flex"
2625
tftags "github.com/hashicorp/terraform-provider-aws/internal/tags"
2726
"github.com/hashicorp/terraform-provider-aws/internal/tfresource"
@@ -344,7 +343,7 @@ func resourceFeatureDelete(ctx context.Context, d *schema.ResourceData, meta int
344343
Project: aws.String(project),
345344
})
346345

347-
if tfawserr.ErrCodeEquals(err, cloudwatchevidently.ErrCodeResourceNotFoundException) {
346+
if errs.IsA[*awstypes.ResourceNotFoundException](err) {
348347
return nil
349348
}
350349

0 commit comments

Comments
 (0)