2
0

🩹 (sendEmail) Save error first in logs

This commit is contained in:
Baptiste Arnaud
2023-02-24 07:47:13 +01:00
parent 0dad07770c
commit 761e1c7184

View File

@ -102,6 +102,7 @@ const sendEmail = async ({
resultId,
message: 'Email not sent',
details: {
error: 'No email body found',
transportConfig,
recipients,
subject,
@ -146,12 +147,12 @@ const sendEmail = async ({
resultId,
message: 'Email not sent',
details: {
error: err,
transportConfig: {
...transportConfig,
auth: { user: transportConfig.auth.user, pass: '******' },
},
email,
error: err,
},
})
}