@@ -363,29 +363,29 @@ func (m SQSMonitor) getNodeInfo(instanceID string) (*NodeInfo, error) {
363
363
if aerr , ok := err .(awserr.Error ); ok && aerr .Code () == "InvalidInstanceID" {
364
364
msg := fmt .Sprintf ("Invalid instance id %s provided" , instanceID )
365
365
log .Warn ().Msg (msg )
366
- return nil , skip {fmt .Errorf (msg )}
366
+ return nil , skip {fmt .Errorf ("%s" , msg )}
367
367
}
368
368
if aerr , ok := err .(awserr.Error ); ok && aerr .Code () == "InvalidInstanceID.NotFound" {
369
369
msg := fmt .Sprintf ("No instance found with instance-id %s" , instanceID )
370
370
log .Warn ().Msg (msg )
371
- return nil , skip {fmt .Errorf (msg )}
371
+ return nil , skip {fmt .Errorf ("%s" , msg )}
372
372
}
373
373
if aerr , ok := err .(awserr.Error ); ok && aerr .Code () == "InvalidInstanceID.Malformed" {
374
374
msg := fmt .Sprintf ("Malformed instance-id %s" , instanceID )
375
375
log .Warn ().Msg (msg )
376
- return nil , skip {fmt .Errorf (msg )}
376
+ return nil , skip {fmt .Errorf ("%s" , msg )}
377
377
}
378
378
if aerr , ok := err .(awserr.Error ); ok && aerr .Code () == "InvalidInstanceID.NotLinkable" {
379
379
msg := fmt .Sprintf ("Instance-id %s not linkable" , instanceID )
380
380
log .Warn ().Msg (msg )
381
- return nil , skip {fmt .Errorf (msg )}
381
+ return nil , skip {fmt .Errorf ("%s" , msg )}
382
382
}
383
383
return nil , err
384
384
}
385
385
if len (result .Reservations ) == 0 || len (result .Reservations [0 ].Instances ) == 0 {
386
386
msg := fmt .Sprintf ("No reservation with instance-id %s" , instanceID )
387
387
log .Warn ().Msg (msg )
388
- return nil , skip {fmt .Errorf (msg )}
388
+ return nil , skip {fmt .Errorf ("%s" , msg )}
389
389
}
390
390
391
391
instance := result .Reservations [0 ].Instances [0 ]
0 commit comments