@@ -28,7 +28,7 @@ func NewAWSClient(data []byte) (*AWSClient, error) {
2828 awsClient := & AWSClient {}
2929 cfg , err := parseAWSConfig (data )
3030 if err != nil {
31- return nil , fmt .Errorf ("error validating config: %v " , err )
31+ return nil , fmt .Errorf ("error validating config: %w " , err )
3232 }
3333
3434 if cfg .Region == "self" {
@@ -47,7 +47,7 @@ func NewAWSClient(data []byte) (*AWSClient, error) {
4747
4848 region , err := metaClient .Region ()
4949 if err != nil {
50- return nil , fmt .Errorf ("unable to retrieve region from ec2metadata: %v " , err )
50+ return nil , fmt .Errorf ("unable to retrieve region from ec2metadata: %w " , err )
5151 }
5252 cfg .Region = region
5353 }
@@ -56,7 +56,7 @@ func NewAWSClient(data []byte) (*AWSClient, error) {
5656
5757 err = awsClient .configure ()
5858 if err != nil {
59- return nil , fmt .Errorf ("error configuring AWS Client: %v " , err )
59+ return nil , fmt .Errorf ("error configuring AWS Client: %w " , err )
6060 }
6161
6262 return awsClient , nil
@@ -129,7 +129,7 @@ func (client *AWSClient) CheckIfScalingGroupExists(name string) (bool, error) {
129129
130130 response , err := client .svcEC2 .DescribeInstances (params )
131131 if err != nil {
132- return false , fmt .Errorf ("couldn't check if an AutoScaling group exists: %v " , err )
132+ return false , fmt .Errorf ("couldn't check if an AutoScaling group exists: %w " , err )
133133 }
134134
135135 return len (response .Reservations ) > 0 , nil
0 commit comments