From 3ff1e22bc39ab29142133dbe3767b7627a6d378a Mon Sep 17 00:00:00 2001 From: Brian Nester <63741334+CyberDragonWizard@users.noreply.github.com> Date: Thu, 19 Jan 2023 16:57:03 -0500 Subject: [PATCH] Update dedupe_contact.js --- samples/dedupe_contact.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/samples/dedupe_contact.js b/samples/dedupe_contact.js index 35cebaf..7f1d483 100644 --- a/samples/dedupe_contact.js +++ b/samples/dedupe_contact.js @@ -19,8 +19,7 @@ exports.main = (event, callback) => { .getById(event.object.objectId, [DEDUPE_PROPERTY]) .then(contactResult => { let dedupePropValue = contactResult.body.properties[DEDUPE_PROPERTY]; - - console.log(`Looking for duplicates based on ${DEDUPE_PROPERTY} = ${dedupePropValue}`); + console.log(`Looking for duplicates based on ${DEDUPE_PROPERTY} = ${dedupePropValue}`) hubspotClient.crm.contacts.searchApi .doSearch({ filterGroups: [{ @@ -55,8 +54,11 @@ exports.main = (event, callback) => { } }) .then(mergeResult => { - console.log('Contacts merged!'); - }); - }); - }); + console.log(`Contacts merged! ${mergeResult}`); + }) + .catch(err => console.error(err)); + }) + .catch(err => console.error(err)); + }) + .catch(err => console.error(err)); };