Skip to content

Commit

Permalink
fix crisp people data error
Browse files Browse the repository at this point in the history
  • Loading branch information
annarhughes committed Jan 6, 2025
1 parent 4fa6184 commit 5c2b0bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/api/mailchimp/mailchimp-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const createMailchimpProfile = async (
try {
return await mailchimp.lists.addListMember(mailchimpAudienceId, profileData);
} catch (error) {
throw new Error(`Create mailchimp profile API call failed: ${error}`);
throw new Error(`Create mailchimp profile API call failed: ${JSON.stringify(error)}`);
}
};

Expand Down
8 changes: 3 additions & 5 deletions src/crisp/crisp.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,9 @@ export class CrispService {
email: string,
): Promise<CrispProfileDataResponse> {
try {
const crispPeopleData = CrispClient.website.updatePeopleData(
crispWebsiteId,
email,
peopleData,
);
const crispPeopleData = CrispClient.website.updatePeopleData(crispWebsiteId, email, {
data: peopleData,
});
return crispPeopleData;
} catch (error) {
throw new Error(`Update crisp profile API call failed: ${error}`);
Expand Down

0 comments on commit 5c2b0bf

Please sign in to comment.