From ba2e216ac1987c6c11de381eda0c36ef5fff810d Mon Sep 17 00:00:00 2001 From: "pierpaolo.didato@emeal.nttdata.com" Date: Wed, 21 Aug 2024 16:36:01 +0200 Subject: [PATCH] Update --- .../onboarding/service/OnboardingService.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingService.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingService.java index 0b70b972..86010aa3 100644 --- a/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingService.java +++ b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/service/OnboardingService.java @@ -176,17 +176,23 @@ public void sendMailRegistrationForContract(ExecutionContext context, Onboarding SendMailInput sendMailInput = builderWithProductAndUserRequest(onboarding); final String templatePath = onboardingWorkflow.emailRegistrationPath(mailTemplatePathConfig); final String confirmTokenUrl = onboardingWorkflow.getConfirmTokenUrl(mailTemplatePlaceholdersConfig); - try { + /*try { notificationService.sendMailRegistrationForContract(onboarding.getId(), onboarding.getInstitution().getDigitalAddress(), sendMailInput, templatePath, confirmTokenUrl); telemetryClient.trackEvent(EVENT_ONBOARDING_FN_NAME, onboardingEventMap(onboarding), Map.of(EVENT_SEND_REGISTRATION_CONTRACT_FN_SUCCESS, 1D)); - } catch (Throwable e) { + } catch (Exception e) { telemetryClient.trackEvent(EVENT_ONBOARDING_FN_NAME, onboardingEventFailureMap(onboarding, new Exception(e)), Map.of(EVENT_SEND_REGISTRATION_CONTRACT_FN_FAILURE, 1D)); context.getLogger().severe(String.format("Impossible to send registration contract email for onboarding with ID %s %s", onboarding.getId(), Arrays.toString(e.getStackTrace()))); - } + }*/ + + notificationService.sendMailRegistrationForContract(onboarding.getId(), + onboarding.getInstitution().getDigitalAddress(), + sendMailInput, + templatePath, + confirmTokenUrl); } public void sendMailRegistrationForContractAggregator(ExecutionContext context, Onboarding onboarding) {