mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
use LogError
This commit is contained in:
parent
48dc2821c5
commit
fdf22daec7
@ -4,6 +4,7 @@ import path from 'path'
|
||||
import { createTransport } from 'nodemailer'
|
||||
import Email from 'email-templates'
|
||||
import i18n from 'i18n'
|
||||
import LogError from '@/server/LogError'
|
||||
|
||||
export const sendEmailTranslated = async (params: {
|
||||
receiver: {
|
||||
@ -73,8 +74,7 @@ export const sendEmailTranslated = async (params: {
|
||||
logger.info('Result: ', result)
|
||||
})
|
||||
.catch((error: unknown) => {
|
||||
logger.error('Error sending notification email: ', error)
|
||||
throw new Error('Error sending notification email!')
|
||||
throw new LogError('Error sending notification email', error)
|
||||
})
|
||||
|
||||
i18n.setLocale(rememberLocaleToRestore)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user