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

Avoid exception message set to 'null' #3625

Merged
merged 1 commit into from
May 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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