xConnect Custom Facet is throwing an error while getting the contact contact.GetFacet
call. We had followed all the steps from this article https://sitecoreamateurs.wordpress.com/2020/08/31/sitecore-9-xconnect-how-to-create-custom-contact-facet/.
The facet is saved but we cannot get the facet and we also see the same error in the interactions table events column JSON and may be even saving is failed partially.
Contact contact = client.Get < Contact > (new IdentifiedContactReference("CRM", "42012573"), new ContactExpandOptions(PersonalInformation.DefaultFacetKey, CustomInfoFacet.DefaultFacetKey));
if (contact == null) {
client.AddContact(contact);
}
var facet = contact.GetFacet < CustomInfoFacet > (CustomInfoFacet.DefaultFacetKey);