Skip to content

Commit

Permalink
Fixing bug, handling case in which a GC entry does not exist prior to…
Browse files Browse the repository at this point in the history
… attempting to parse from source

Signed-off-by: Joshua Palis <[email protected]>
  • Loading branch information
joshpalis committed Oct 16, 2023
1 parent c84321f commit db4eafa
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,16 @@ protected void doExecute(Task task, WorkflowRequest request, ActionListener<Work
client.get(getRequest, ActionListener.wrap(response -> {
context.restore();

if (!response.isExists()) {
listener.onFailure(
new FlowFrameworkException(
"Failed to retrieve template (" + workflowId + ") from global context.",
RestStatus.NOT_FOUND
)
);
return;
}

// Parse template from document source
Template template = Template.parseFromDocumentSource(response.getSourceAsString());

Expand Down

0 comments on commit db4eafa

Please sign in to comment.