Skip to content

Commit

Permalink
🩹 (sendEmail) Save error first in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Feb 24, 2023
1 parent 0dad077 commit 761e1c7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ const sendEmail = async ({
resultId,
message: 'Email not sent',
details: {
error: 'No email body found',
transportConfig,
recipients,
subject,
Expand Down Expand Up @@ -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,
},
})
}
Expand Down

0 comments on commit 761e1c7

Please sign in to comment.