Skip to content

Commit

Permalink
Fix/wrap reviewer mail in try catch (#1136)
Browse files Browse the repository at this point in the history
* fix: wrap send reviewer mail in try catch

* chore: add comment
  • Loading branch information
alexanderleegs authored Feb 19, 2024
1 parent 2e3f1b4 commit 763aca9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/services/review/ReviewRequestService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,14 @@ export default class ReviewRequestService {
// Should not reach here
throw new Error(`Reviewer with id ${id} has no email`)
}
await this.mailer.sendMail(reviewerEmail, subject, emailBody)
try {
await this.mailer.sendMail(reviewerEmail, subject, emailBody)
} catch (mailerErr) {
// Non-blocking
logger.error(
`Error when sending reviewer mail to ${reviewerEmail}: ${mailerErr}`
)
}
})
)

Expand Down

0 comments on commit 763aca9

Please sign in to comment.