Migrating AppError to error for mailservice (#16810)

* Migrating AppError to error for mailservice

* Updating i18n strings

* Fixing shadow variable problem

* Addressing PR review comments

* fixing test
Этот коммит содержится в:
Jesús Espino
2021-02-09 12:28:42 +01:00
коммит произвёл GitHub
родитель 572f861675
Коммит fbe0294e86
8 изменённых файлов: 61 добавлений и 95 удалений

Просмотреть файл

@@ -239,8 +239,8 @@ func (es *EmailService) sendBatchedEmailNotification(userID string, notification
body.Props["Posts"] = template.HTML(contents)
body.Props["BodyText"] = translateFunc("api.email_batching.send_batched_email_notification.body_text", len(notifications))
if err := es.sendNotificationMail(user.Email, subject, body.Render()); err != nil {
mlog.Warn("Unable to send batched email notification", mlog.String("email", user.Email), mlog.Err(err))
if nErr := es.sendNotificationMail(user.Email, subject, body.Render()); nErr != nil {
mlog.Warn("Unable to send batched email notification", mlog.String("email", user.Email), mlog.Err(nErr))
}
}