diff --git a/v1/providers/shadeform/instance.go b/v1/providers/shadeform/instance.go index 6f4e089..372a9fb 100644 --- a/v1/providers/shadeform/instance.go +++ b/v1/providers/shadeform/instance.go @@ -253,7 +253,11 @@ func (c *ShadeformClient) ListInstances(ctx context.Context, _ v1.ListInstancesA for _, instance := range resp.Instances { singleInstance, err := c.convertShadeformInstanceToV1Instance(instance) if err != nil { - return nil, errors.WrapAndTrace(err) + c.logger.Warn(ctx, "skipping instance without refID tag", + v1.LogField("instanceID", instance.Id), + v1.LogField("instanceName", instance.Name), + v1.LogField("error", err.Error())) + continue } instances = append(instances, *singleInstance) } @@ -357,13 +361,13 @@ func (c *ShadeformClient) convertShadeformInstanceToV1Instance(shadeformInstance refID, found := tags[refIDTagName] if !found { - return nil, errors.WrapAndTrace(errors.New("could not find refID tag")) + return nil, fmt.Errorf("instance missing refID tag: instanceID=%s, instanceName=%s", shadeformInstance.Id, shadeformInstance.Name) } delete(tags, refIDTagName) cloudCredRefID, found := tags[cloudCredRefIDTagName] if !found { - return nil, errors.WrapAndTrace(errors.New("could not find cloudCredRefID tag")) + return nil, fmt.Errorf("instance missing cloudCredRefID tag: instanceID=%s, instanceName=%s", shadeformInstance.Id, shadeformInstance.Name) } delete(tags, cloudCredRefIDTagName)