Skip to content

Commit

Permalink
Incorporate changes from #36932.
Browse files Browse the repository at this point in the history
  • Loading branch information
ewbankkit committed Apr 18, 2024
1 parent 4c530cd commit be74dd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions internal/conns/apiretry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,11 @@ func TestAddIsErrorRetryables(t *testing.T) {
},
},
f: func(err error) aws.Ternary {
if err != nil {
var oe *smithy.OperationError
if errors.As(err, &oe) {
if oe.OperationName == "StartDeployment" {
if errs.IsA[*appconfigtypes.ConflictException](err) {
return aws.TrueTernary
}
if err, ok := errs.As[*smithy.OperationError](err); ok {
switch err.OperationName {
case "StartDeployment":
if errs.IsA[*appconfigtypes.ConflictException](err) {
return aws.TrueTernary
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions internal/service/appconfig/service_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func (p *servicePackage) NewClient(ctx context.Context, config map[string]any) (
// if ongoing deployments are in-progress, thus we handle them
// here for the service client.
o.Retryer = conns.AddIsErrorRetryables(cfg.Retryer().(aws_sdkv2.RetryerV2), retry_sdkv2.IsErrorRetryableFunc(func(err error) aws_sdkv2.Ternary {
if v, ok := errs.As[*smithy.OperationError](err); ok {
switch v.OperationName {
if err, ok := errs.As[*smithy.OperationError](err); ok {
switch err.OperationName {
case "StartDeployment":
if errs.IsA[*awstypes.ConflictException](err) {
return aws_sdkv2.TrueTernary
Expand Down

0 comments on commit be74dd6

Please sign in to comment.