Skip to content

Commit

Permalink
Merge pull request #5827 from malithie/actions-core
Browse files Browse the repository at this point in the history
Re-add runtime exception when validating for actions to be handled at the upper layer .
  • Loading branch information
malithie authored Jul 31, 2024
2 parents fd0698b + 477fce2 commit 82c7e9d
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public ActionExecutionStatus execute(ActionType actionType, Map<String, Object>
.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);

}
Expand All @@ -112,10 +112,7 @@ private List<Action> getActionsByActionType(ActionType actionType, String tenant
private void validateActions(List<Action> 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) {
Expand Down

0 comments on commit 82c7e9d

Please sign in to comment.