Skip to content

Commit 7fa6110

Browse files
ekristencorybekk
authored andcommitted
fix(quicksight-user): skip unsupported regions
1 parent ba10fea commit 7fa6110

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

resources/quicksight-user.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ package resources
22

33
import (
44
"context"
5+
"errors"
56

67
"github.com/gotidy/ptr"
78

89
"github.com/aws/aws-sdk-go/service/quicksight"
910
"github.com/aws/aws-sdk-go/service/quicksight/quicksightiface"
11+
1012
"github.com/ekristen/libnuke/pkg/registry"
1113
"github.com/ekristen/libnuke/pkg/resource"
1214
"github.com/ekristen/libnuke/pkg/types"
@@ -60,7 +62,11 @@ func (l *QuickSightUserLister) List(_ context.Context, o interface{}) ([]resourc
6062
return !lastPage
6163
})
6264
if err != nil {
63-
return nil, err
65+
var notFoundException *quicksight.ResourceNotFoundException
66+
if !errors.As(err, &notFoundException) {
67+
return nil, err
68+
}
69+
return resources, nil
6470
}
6571

6672
return resources, nil

0 commit comments

Comments
 (0)