Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link tracking broken in transactional emails #108

Open
serge005 opened this issue Oct 1, 2024 · 1 comment
Open

Link tracking broken in transactional emails #108

serge005 opened this issue Oct 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@serge005
Copy link

serge005 commented Oct 1, 2024

When sending a transactional email with a link, it properly converts it to a tracked link, but clicking that link does not register the "click".

Error in logs:

✖ error PrismaClientValidationError:
Invalid prisma_1.prisma.email.update() invocation in
/app/packages/api/controllers/Webhooks/Incoming/SNS.js:61:45

58 if (body.eventType === "Bounce") {
59 signale_1.default.warn(Bounce received for ${email.contact.email} from ${project.name});
60 }
→ 61 await prisma_1.prisma.email.update({
where: {
messageId: "010001924a70cf24-89e0e14c-6b27-48cf-a9c9-744fd9e3ba1b-000000"
},
data: {
status: "CLICKED"
~~~~~~~~~
}
})

Invalid value for argument status. Expected EmailStatus.
at Dn (/app/node_modules/@prisma/client/runtime/library.js:114:8082)
at Mn.handleRequestError (/app/node_modules/@prisma/client/runtime/library.js:121:7396)
at Mn.handleAndLogRequestError (/app/node_modules/@prisma/client/runtime/library.js:121:7061)
at Mn.request (/app/node_modules/@prisma/client/runtime/library.js:121:6745)
at async l (/app/node_modules/@prisma/client/runtime/library.js:130:9633)
at async SNSWebhook.receiveSNSWebhook (/app/packages/api/controllers/Webhooks/Incoming/SNS.js:61:17)
::ffff:127.0.0.1 - POST /webhooks/incoming/sns HTTP/1.1 200 - - 30.141 ms

@driaug driaug added the bug Something isn't working label Oct 3, 2024
@driaug
Copy link
Member

driaug commented Oct 9, 2024

The link is properly tagged and tracked but the reason why it fails is because this case does not have a return statement.

It creates the link record and then continues.

https://github.com/useplunk/plunk/blob/main/packages/api/src/controllers/Webhooks/Incoming/SNS.ts#L45-L50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants