Skip to content

Commit

Permalink
11927 brevo (#12141)
Browse files Browse the repository at this point in the history
* add try catch validation

* update version

* update package.json version
  • Loading branch information
luancazarine committed May 28, 2024
1 parent 27c50a5 commit e84d977
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion components/brevo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/brevo",
"version": "0.1.0",
"version": "0.1.1",
"description": "Pipedream Brevo Components",
"main": "brevo.app.mjs",
"keywords": [
Expand Down

0 comments on commit e84d977

Please sign in to comment.