Skip to content

Commit

Permalink
set transform ID null when it cannot be determined
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismarget-j committed Sep 27, 2023
1 parent d578b7f commit acf2bc6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apstra/blueprint/datacenter_generic_system_link.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,11 @@ func (o *DatacenterGenericSystemLink) getTransformId(ctx context.Context, client

transformId, err := client.GetTransformationIdByIfName(ctx, apstra.ObjectId(o.TargetSwitchId.ValueString()), o.TargetSwitchIfName.ValueString())
if err != nil {
var ace apstra.ClientErr
if errors.As(err, &ace) && ace.Type() == apstra.ErrNotfound {
o.TargetSwitchIfTransformId = types.Int64Null()
return
}
diags.AddError(fmt.Sprintf("failed to get transform ID for %q", o.digest()), err.Error())
return
}
Expand Down

0 comments on commit acf2bc6

Please sign in to comment.