Skip to content

Commit 27108a4

Browse files
authored
Merge pull request #2397 from kishorj/fix-error-handling
Fix listener utils error handling
2 parents 0b5c5bd + ded2882 commit 27108a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/deploy/elbv2/listener_utils.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ func buildSDKActions(modelActions []elbv2model.Action, featureGates config.Featu
2222
sdkActions = make([]*elbv2sdk.Action, 0, len(modelActions))
2323
for index, modelAction := range modelActions {
2424
sdkAction, err := buildSDKAction(modelAction, featureGates)
25-
sdkAction.Order = awssdk.Int64(int64(index) + 1)
2625
if err != nil {
2726
return nil, err
2827
}
28+
sdkAction.Order = awssdk.Int64(int64(index) + 1)
2929
sdkActions = append(sdkActions, sdkAction)
3030
}
3131
}
@@ -56,7 +56,7 @@ func buildSDKAction(modelAction elbv2model.Action, featureGates config.FeatureGa
5656
if len(forwardConfig.TargetGroups) == 1 {
5757
sdkObj.TargetGroupArn = forwardConfig.TargetGroups[0].TargetGroupArn
5858
} else {
59-
return nil, errors.New("Weighted target groups feature is disabled.")
59+
return nil, errors.New("weighted target groups feature is disabled")
6060
}
6161
} else {
6262
sdkObj.ForwardConfig = forwardConfig

0 commit comments

Comments
 (0)