From 3e1e7cdd3e119c4724373941616a48325ea15fbf Mon Sep 17 00:00:00 2001 From: MDiaz8778 Date: Mon, 9 Dec 2024 00:09:46 -0300 Subject: [PATCH] Update volunteersServices.ts --- src/services/volunteersServices.ts | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/services/volunteersServices.ts b/src/services/volunteersServices.ts index 29ab657..c7572ff 100644 --- a/src/services/volunteersServices.ts +++ b/src/services/volunteersServices.ts @@ -243,11 +243,17 @@ export const registerVolunteer = async (input: VolunteerRegistrationInput, userI const inlinedHtml = juice(mailContent); - await mailService.sendEmail({ - to: usuario.email, - subject: `Confirmación de inscripción: ${detalleOportunidad.description}`, - html: inlinedHtml - }); + try { + await mailService.sendEmail({ + to: usuario.email, + subject: `Confirmación de inscripción: ${detalleOportunidad.description}`, + html: inlinedHtml + }); + } catch (error) { + console.error('Error sending email:', error); + throw new Error('Failed to send email'); + } + return {