Skip to content

Commit

Permalink
Fixed nil pointer error in contact_list_contact package
Browse files Browse the repository at this point in the history
  • Loading branch information
charliecon committed Sep 30, 2024
1 parent 3e4976f commit 9a9d66b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ func getAllContacts(ctx context.Context, clientConfig *platformclientv2.Configur
}

for _, contact := range contacts {
//id := createCustomContactId(*contact.ContactListId, *contact.Id)
resources[*contact.Id] = &resourceExporter.ResourceMeta{Name: *contact.Id}
}

Expand All @@ -53,7 +52,7 @@ func createOutboundContactListContact(ctx context.Context, d *schema.ResourceDat
log.Printf("Creating contact in contact list '%s'", contactListId)
contactResponseBody, resp, err := cp.createContact(ctx, contactListId, contactRequestBody, priority, clearSystemData, doNotQueue)
if err != nil {
return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("failed to create contact '%s' for contact list '%s': %v", *contactRequestBody.Id, contactListId, err), resp)
return util.BuildAPIDiagnosticError(resourceName, fmt.Sprintf("failed to create contact for contact list '%s': %v", contactListId, err), resp)
}

if len(contactResponseBody) != 1 {
Expand Down

0 comments on commit 9a9d66b

Please sign in to comment.