diff --git a/core/src/main/java/com/netflix/conductor/core/events/SimpleActionProcessor.java b/core/src/main/java/com/netflix/conductor/core/events/SimpleActionProcessor.java index fa2fe6ad87..3ba42fb9df 100644 --- a/core/src/main/java/com/netflix/conductor/core/events/SimpleActionProcessor.java +++ b/core/src/main/java/com/netflix/conductor/core/events/SimpleActionProcessor.java @@ -128,6 +128,7 @@ private Map completeTask( String taskId = (String) replaced.get("taskId"); String taskRefName = (String) replaced.get("taskRefName"); Boolean retry = Boolean.TRUE.equals(replaced.get("retry")); + String failReason = (String) replaced.get("failReason"); TaskModel taskModel = null; if (StringUtils.isNotEmpty(taskId)) { @@ -174,6 +175,8 @@ private Map completeTask( if (retry) { status = TaskModel.Status.FAILED; + } else if (status.equals(TaskModel.Status.FAILED_WITH_TERMINAL_ERROR) && failReason != null) { + taskModel.setReasonForIncompletion(failReason); } taskModel.setStatus(status);