Skip to content

Commit 1914aa5

Browse files
ekristencorybekk
authored andcommitted
fix(gamelift): skip unsupported regions
1 parent 331b9be commit 1914aa5

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

resources/gamelift-mm-config.go

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

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

78
"github.com/aws/aws-sdk-go/service/gamelift"
@@ -36,7 +37,11 @@ func (l *GameLiftMatchmakingConfigurationLister) List(_ context.Context, o inter
3637
for {
3738
resp, err := svc.DescribeMatchmakingConfigurations(params)
3839
if err != nil {
39-
return nil, err
40+
var unsupportedRegionException *gamelift.UnsupportedRegionException
41+
if errors.As(err, &unsupportedRegionException) {
42+
return resources, nil
43+
}
44+
return resources, err
4045
}
4146

4247
for _, config := range resp.Configurations {

resources/gamelift-mm-rule.go

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

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

67
"github.com/aws/aws-sdk-go/service/gamelift"
78

@@ -35,7 +36,11 @@ func (l *GameLiftMatchmakingRuleSetLister) List(_ context.Context, o interface{}
3536
for {
3637
resp, err := svc.DescribeMatchmakingRuleSets(params)
3738
if err != nil {
38-
return nil, err
39+
var unsupportedRegionException *gamelift.UnsupportedRegionException
40+
if errors.As(err, &unsupportedRegionException) {
41+
return resources, nil
42+
}
43+
return resources, err
3944
}
4045

4146
for _, ruleSet := range resp.RuleSets {

0 commit comments

Comments
 (0)