From 27de79379c1ed604d6c4144ca3451cc62e2efec3 Mon Sep 17 00:00:00 2001 From: Kishor Joshi Date: Fri, 3 Dec 2021 09:08:49 -0800 Subject: [PATCH 1/2] fix listener utils error handling --- pkg/deploy/elbv2/listener_utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/deploy/elbv2/listener_utils.go b/pkg/deploy/elbv2/listener_utils.go index 454499e46..7e807df6f 100644 --- a/pkg/deploy/elbv2/listener_utils.go +++ b/pkg/deploy/elbv2/listener_utils.go @@ -22,10 +22,10 @@ func buildSDKActions(modelActions []elbv2model.Action, featureGates config.Featu sdkActions = make([]*elbv2sdk.Action, 0, len(modelActions)) for index, modelAction := range modelActions { sdkAction, err := buildSDKAction(modelAction, featureGates) - sdkAction.Order = awssdk.Int64(int64(index) + 1) if err != nil { return nil, err } + sdkAction.Order = awssdk.Int64(int64(index) + 1) sdkActions = append(sdkActions, sdkAction) } } From ded2882b99a5106fdc3617841f53b54efed13b65 Mon Sep 17 00:00:00 2001 From: Kishor Joshi Date: Fri, 3 Dec 2021 09:44:07 -0800 Subject: [PATCH 2/2] fix error string --- pkg/deploy/elbv2/listener_utils.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/deploy/elbv2/listener_utils.go b/pkg/deploy/elbv2/listener_utils.go index 7e807df6f..82f498968 100644 --- a/pkg/deploy/elbv2/listener_utils.go +++ b/pkg/deploy/elbv2/listener_utils.go @@ -56,7 +56,7 @@ func buildSDKAction(modelAction elbv2model.Action, featureGates config.FeatureGa if len(forwardConfig.TargetGroups) == 1 { sdkObj.TargetGroupArn = forwardConfig.TargetGroups[0].TargetGroupArn } else { - return nil, errors.New("Weighted target groups feature is disabled.") + return nil, errors.New("weighted target groups feature is disabled") } } else { sdkObj.ForwardConfig = forwardConfig