Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3625 from marosmars/main
Browse files Browse the repository at this point in the history
Avoid exception message set to 'null'
  • Loading branch information
v1r3n authored May 27, 2023
2 parents ee94b89 + f4f3426 commit 4fb9806
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
public class EventClient extends ClientBase {
private static final GenericType<List<EventHandler>> eventHandlerList =
new GenericType<List<EventHandler>>() {};

/** Creates a default metadata client */
public EventClient() {
this(new DefaultClientConfig(), new DefaultConductorClientConfiguration(), null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,11 @@ Optional<TaskModel> retry(
break;
}
updateWorkflowOutput(workflow, task);
throw new TerminateWorkflowException(task.getReasonForIncompletion(), status, task);
final String errMsg =
String.format(
"Task %s failed with status: %s and reason: '%s'",
task.getTaskId(), status, task.getReasonForIncompletion());
throw new TerminateWorkflowException(errMsg, status, task);
}

// retry... - but not immediately - put a delay...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public LocalServerRunner(int port, String conductorVersion) {
public String getServerAPIUrl() {
return this.serverURL + "api/";
}

/**
* Starts the local server. Downloads the latest conductor build from the maven repo If you want
* to start the server from a specific download location, set `repositoryURL` system property
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,12 @@ class SimpleWorkflowSpec extends AbstractSpecification {
and: "verify that the workflow is in a failed state"
with(workflowExecutionService.getExecutionStatus(workflowInstanceId, true)) {
status == Workflow.WorkflowStatus.FAILED
reasonForIncompletion == 'NON TRANSIENT ERROR OCCURRED: An integration point required to complete the task is down'
def t1 = getTaskByRefName('t1')
reasonForIncompletion == "Task ${t1.taskId} failed with status: FAILED and reason: " +
"'NON TRANSIENT ERROR OCCURRED: An integration point required to complete the task is down'"
output['o1'] == 'p1 value'
output['validationErrors'] == 'There was a terminal error'
getTaskByRefName('t1').retryCount == 0
t1.retryCount == 0
failedReferenceTaskNames == ['t1'] as HashSet
failedTaskNames == ['integration_task_1'] as HashSet
}
Expand Down

0 comments on commit 4fb9806

Please sign in to comment.