diff --git a/components/brevo/actions/add-or-update-contact/add-or-update-contact.mjs b/components/brevo/actions/add-or-update-contact/add-or-update-contact.mjs index 1b5dd64beeb6b..2bdcbdd6ab96e 100644 --- a/components/brevo/actions/add-or-update-contact/add-or-update-contact.mjs +++ b/components/brevo/actions/add-or-update-contact/add-or-update-contact.mjs @@ -4,7 +4,7 @@ export default { key: "brevo-add-or-update-contact", name: "Add or Update a contact", description: "Add or Update a contact", - version: "0.0.1", + version: "0.0.2", type: "action", props: { brevo, @@ -55,10 +55,13 @@ export default { const listIds = Object.keys(this.listIds).map((key) => parseInt(this.listIds[key], 10)); let contact = null; if (identifier) { - contact = await this.brevo.existingContactByIdentifier( - $, - encodeURIComponent(identifier), - ); + try { + contact = await this.brevo.existingContactByIdentifier( + encodeURIComponent(identifier), + ); + } catch (e) { + contact = null; + } } const attributes = { diff --git a/components/brevo/package.json b/components/brevo/package.json index 09eece9d1bbee..d68082ac1ce16 100644 --- a/components/brevo/package.json +++ b/components/brevo/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/brevo", - "version": "0.1.0", + "version": "0.1.1", "description": "Pipedream Brevo Components", "main": "brevo.app.mjs", "keywords": [