fix(email): log notify send attempts without error framing
This commit is contained in:
@@ -63,10 +63,15 @@ export default async function ApiProxy(req, res) {
|
||||
const notifyClient = new NotifyClient(process.env.NOTIFY_API_KEY);
|
||||
//const emailReplyToId = process.env.EMAIL_REPLY_TO_ID;
|
||||
|
||||
consoleLogger({
|
||||
event: "notify_send_attempt",
|
||||
payload: redactSensitive(data)
|
||||
});
|
||||
console.info(
|
||||
"notify_send_attempt",
|
||||
redactSensitive({
|
||||
templateId: data.templateId,
|
||||
emailAddress: data.emailAddress,
|
||||
reference: data.reference,
|
||||
personalisation: data.personalisation
|
||||
})
|
||||
);
|
||||
|
||||
try {
|
||||
await notifyClient.sendEmail(data.templateId, data.emailAddress, {
|
||||
|
||||
Reference in New Issue
Block a user