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 notifyClient = new NotifyClient(process.env.NOTIFY_API_KEY);
|
||||||
//const emailReplyToId = process.env.EMAIL_REPLY_TO_ID;
|
//const emailReplyToId = process.env.EMAIL_REPLY_TO_ID;
|
||||||
|
|
||||||
consoleLogger({
|
console.info(
|
||||||
event: "notify_send_attempt",
|
"notify_send_attempt",
|
||||||
payload: redactSensitive(data)
|
redactSensitive({
|
||||||
});
|
templateId: data.templateId,
|
||||||
|
emailAddress: data.emailAddress,
|
||||||
|
reference: data.reference,
|
||||||
|
personalisation: data.personalisation
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await notifyClient.sendEmail(data.templateId, data.emailAddress, {
|
await notifyClient.sendEmail(data.templateId, data.emailAddress, {
|
||||||
|
|||||||
Reference in New Issue
Block a user