From 6791f692817ad87c1297b50beafa1f19e8e4f96d Mon Sep 17 00:00:00 2001 From: manuraf Date: Thu, 25 Jan 2024 15:22:06 +0100 Subject: [PATCH] try only TaskFailedException --- .../selfcare/onboarding/functions/OnboardingFunctions.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/functions/OnboardingFunctions.java b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/functions/OnboardingFunctions.java index 62ed9313f..b01af9f5b 100644 --- a/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/functions/OnboardingFunctions.java +++ b/apps/onboarding-functions/src/main/java/it/pagopa/selfcare/onboarding/functions/OnboardingFunctions.java @@ -111,7 +111,7 @@ public void onboardingsOrchestrator( Optional optNextStatus = workflowExecutor.execute(ctx, onboarding); optNextStatus.ifPresent(onboardingStatus -> service.updateOnboardingStatus(onboardingId, onboardingStatus)); - } catch (Exception ex) { + } catch (TaskFailedException ex) { functionContext.getLogger().warning("Error during workflowExecutor execute, msg: " + ex.getMessage()); service.updateOnboardingStatusAndInstanceId(onboardingId, OnboardingStatus.FAILED, ctx.getInstanceId()); }