pipedream
pipedream copied to clipboard
Brevo
App
Brevo
Summary:
Fails to add new contact when email not found
Details:
I got this error in a recent workflow run. It makes no sense, because when the value passed to "Contact" (which can be an ID or email according to the docs) is not found, it should fall back on simply adding a new contact.
AxiosError - Request failed with status code 404
{"code":"document_not_found","message":"Contact does not exist"}
at null.settle (/pipedream/dist/code/f957e296eee733c4736681a2c09f0a8644d946f993b71c0e4d24807278ea53c3/node_modules/.pnpm/[email protected]/node_modules/axios/dist/node/axios.cjs:1967:12)
at Unzip.handleStreamEnd (/pipedream/dist/code/f957e296eee733c4736681a2c09f0a8644d946f993b71c0e4d24807278ea53c3/node_modules/.pnpm/[email protected]/node_modules/axios/dist/node/axios.cjs:3066:11)
at Unzip.emit (node:events:530:35)
at null.endReadableNT (node:internal/streams/readable:1696:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at null.callAxios (/pipedream/dist/code/f957e296eee733c4736681a2c09f0a8644d946f993b71c0e4d24807278ea53c3/node_modules/.pnpm/@[email protected]/node_modules/@pipedream/platform/dist/axios.js:110:26)
at Object.existingContactByIdentifier (file:///pipedream/dist/code/f957e296eee733c4736681a2c09f0a8644d946f993b71c0e4d24807278ea53c3/code/brevo.app.mjs:39:16)
at Object.run (file:///pipedream/dist/code/f957e296eee733c4736681a2c09f0a8644d946f993b71c0e4d24807278ea53c3/code/actions/add-or-update-contact/add-or-update-contact.mjs:58:17)
at null.executeComponent (/var/task/launch_worker.js:286:22)
at MessagePort.messageHandler (/var/task/launch_worker.js:785:28)
(add_or_update_contact)
Screenshots:

I can reproduce this issue
Hi everyone, all test cases are passed! Ready for release!
Test report https://vunguyenhung.notion.site/Brevo-a0cb15ea187f4ed69ca57e607623bde9
@vunguyenhung It seems the opposite issue is occurring now: it doesn't correctly handle the case when the contact already exists.
AxiosError - Request failed with status code 400
{"code":"duplicate_parameter","message":"Contact already exist"}
@vunguyenhung I'm not sure how you're doing this in code, but you probably just want to set the updateEnabled parameter to true, as per the documentation.
Hey @alexreg, thank you for reporting your issue.
I've created a new ticket here and added it to priorized backlog