From 8f3c26af03c9c02b5ef624dc36de3aeb4f18977a Mon Sep 17 00:00:00 2001 From: malithie Date: Wed, 31 Jul 2024 16:24:07 +0530 Subject: [PATCH 1/2] re-add runtime exception for validation. --- .../identity/action/execution/ActionExecutorServiceImpl.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/components/action-mgt/org.wso2.carbon.identity.action.execution/src/main/java/org/wso2/carbon/identity/action/execution/ActionExecutorServiceImpl.java b/components/action-mgt/org.wso2.carbon.identity.action.execution/src/main/java/org/wso2/carbon/identity/action/execution/ActionExecutorServiceImpl.java index fa20f3c04bc0..2035f8f656ad 100644 --- a/components/action-mgt/org.wso2.carbon.identity.action.execution/src/main/java/org/wso2/carbon/identity/action/execution/ActionExecutorServiceImpl.java +++ b/components/action-mgt/org.wso2.carbon.identity.action.execution/src/main/java/org/wso2/carbon/identity/action/execution/ActionExecutorServiceImpl.java @@ -112,10 +112,7 @@ private List getActionsByActionType(ActionType actionType, String tenant private void validateActions(List actions, ActionType actionType) throws ActionExecutionException { if (CollectionUtils.isEmpty(actions)) { - if (LOG.isDebugEnabled()) { - LOG.debug("No actions found for action type: " + actionType); - } - return; + throw new ActionExecutionRuntimeException("No actions found for action type: " + actionType); } if (actions.size() > 1) { From 477fce2275f0872882512a4612818520fe8ffb4b Mon Sep 17 00:00:00 2001 From: malithie Date: Wed, 31 Jul 2024 17:10:15 +0530 Subject: [PATCH 2/2] Logged runtime excpetions as a debug due to less sensitivity. --- .../identity/action/execution/ActionExecutorServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/action-mgt/org.wso2.carbon.identity.action.execution/src/main/java/org/wso2/carbon/identity/action/execution/ActionExecutorServiceImpl.java b/components/action-mgt/org.wso2.carbon.identity.action.execution/src/main/java/org/wso2/carbon/identity/action/execution/ActionExecutorServiceImpl.java index 2035f8f656ad..18bfc165056d 100644 --- a/components/action-mgt/org.wso2.carbon.identity.action.execution/src/main/java/org/wso2/carbon/identity/action/execution/ActionExecutorServiceImpl.java +++ b/components/action-mgt/org.wso2.carbon.identity.action.execution/src/main/java/org/wso2/carbon/identity/action/execution/ActionExecutorServiceImpl.java @@ -92,7 +92,7 @@ public ActionExecutionStatus execute(ActionType actionType, Map .orElse(new ActionExecutionStatus(ActionExecutionStatus.Status.FAILED, eventContext)); } catch (ActionExecutionRuntimeException e) { // todo: add to diagnostics - LOG.error("Skip executing actions for action type: " + actionType.name() + ". Error: " + e.getMessage(), e); + LOG.debug("Skip executing actions for action type: " + actionType.name(), e); return new ActionExecutionStatus(ActionExecutionStatus.Status.FAILED, eventContext); }