Skip to content

Commit

Permalink
Improve authenticator mgt to store image and description.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thisara-Welmilla committed Jan 20, 2025
1 parent e6e74dd commit 7b1370e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ ActionExecutionStatus execute(ActionType actionType, Map<String, Object> eventCo
ActionExecutionException;

/**
* Resolve the action by given the action id and execute them.
* Resolve the action from given action id and execute it.
*
* @param actionType Action Type.
* @param actionId The action Id of the action that need to be executed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public ActionExecutionStatus<?> execute(ActionType actionType, Map<String, Objec
}

/**
* Resolve the action by given the action id list and execute them.
* Resolve the action from given action id and execute it.
*
* @param actionType Action Type.
* @param actionId The action Id of the action that need to be executed.
Expand All @@ -139,15 +139,15 @@ public ActionExecutionStatus<?> execute(ActionType actionType, String actionId,
Map<String, Object> eventContext, String tenantDomain)
throws ActionExecutionException {

if (actionId == null) {
throw new ActionExecutionException("No action Ids found for action type: " + actionType.name());
if (actionId.isEmpty()) {
throw new ActionExecutionException("Action Id cannot be empty.");
}

Action action = getActionByActionId(actionType, actionId, tenantDomain);
try {
return execute(action, eventContext);
} catch (ActionExecutionRuntimeException e) {
LOG.debug("Skip executing actions for action type: " + actionType.name(), e);
LOG.debug("Skip executing action for action type: " + actionType.name(), e);
// Skip executing actions when no action available is considered as action execution being successful.
return new SuccessStatus.Builder().setResponseContext(eventContext).build();
}
Expand Down

0 comments on commit 7b1370e

Please sign in to comment.