Skip to content

Commit

Permalink
Merge pull request #1428 from CloudSlang/check-empty
Browse files Browse the repository at this point in the history
check if the exception key does not have an empty value
  • Loading branch information
QueueUpX authored Jan 23, 2024
2 parents 1eac2fb + 4bde3c8 commit 8c4ff80
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,12 @@ private Map<String, Value> runJavaAction(Map<String, SerializableSessionObject>

final Serializable exception = returnMap.get(EXCEPTION);
if (exception != null) {
logException(exception.toString());
// some java actions contain the exception key without having an actual exception
// this is because some actions have the output field named as "errorMessage", others "exception"
String exceptionMessage = exception.toString();
if (!exceptionMessage.isEmpty()) {
logException(exceptionMessage);
}
}

return handleSensitiveValues(returnMap, currentContext);
Expand Down

0 comments on commit 8c4ff80

Please sign in to comment.