diff --git a/core/src/emails/sendEmailTranslated.ts b/core/src/emails/sendEmailTranslated.ts index 2e5bcca93..205ca07c6 100644 --- a/core/src/emails/sendEmailTranslated.ts +++ b/core/src/emails/sendEmailTranslated.ts @@ -25,7 +25,7 @@ export const sendEmailTranslated = async ({ } template: string locals: Record -}): Promise | boolean | null> => { +}): Promise | boolean | null | Error> => { // TODO: test the calling order of 'i18n.setLocale' for example: language of logging 'en', language of email receiver 'es', reset language of current user 'de' if (!CONFIG.EMAIL) { @@ -113,6 +113,7 @@ export const sendEmailTranslated = async ({ }) .catch((error: unknown) => { logger.error('Error sending notification email', error) + return error }) return resultSend