mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 09:56:05 +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 { createTransport } from 'nodemailer'
|
||||||
import Email from 'email-templates'
|
import Email from 'email-templates'
|
||||||
import i18n from 'i18n'
|
import i18n from 'i18n'
|
||||||
|
import LogError from '@/server/LogError'
|
||||||
|
|
||||||
export const sendEmailTranslated = async (params: {
|
export const sendEmailTranslated = async (params: {
|
||||||
receiver: {
|
receiver: {
|
||||||
@ -73,8 +74,7 @@ export const sendEmailTranslated = async (params: {
|
|||||||
logger.info('Result: ', result)
|
logger.info('Result: ', result)
|
||||||
})
|
})
|
||||||
.catch((error: unknown) => {
|
.catch((error: unknown) => {
|
||||||
logger.error('Error sending notification email: ', error)
|
throw new LogError('Error sending notification email', error)
|
||||||
throw new Error('Error sending notification email!')
|
|
||||||
})
|
})
|
||||||
|
|
||||||
i18n.setLocale(rememberLocaleToRestore)
|
i18n.setLocale(rememberLocaleToRestore)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user