Skip to content

Commit eb7dc33

Browse files
authored
visibility for AWS err code in addition to message (#176)
Description of changes: Provide aws error code(e.g. Validation exception, InvalidParameterValue) in addition to message in the condition message Testing: Manually introduced an aws error from sdkDelete and verified it gets updated in conditions By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 5182a53 commit eb7dc33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/pkg/resource/sdk.go.tpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ func (rm *resourceManager) updateConditions (
224224
errorMessage = err.Error()
225225
} else {
226226
awsErr, _ := ackerr.AWSError(err)
227-
errorMessage = awsErr.Message()
227+
errorMessage = awsErr.Error()
228228
}
229229
terminalCondition.Status = corev1.ConditionTrue
230230
terminalCondition.Message = &errorMessage
@@ -247,7 +247,7 @@ func (rm *resourceManager) updateConditions (
247247
awsErr, _ := ackerr.AWSError(err)
248248
errorMessage := err.Error()
249249
if awsErr != nil {
250-
errorMessage = awsErr.Message()
250+
errorMessage = awsErr.Error()
251251
}
252252
recoverableCondition.Message = &errorMessage
253253
} else if recoverableCondition != nil {

0 commit comments

Comments
 (0)