Skip to content

Commit

Permalink
Prevent missing error reporting on failure callback and improve logging
Browse files Browse the repository at this point in the history
Signed-off-by: Benjamin Rögner <benjamin.roegner@here.com>

Signed-off-by: Benjamin Rögner <benjamin.roegner@here.com>
  • Loading branch information
roegi committed Jan 31, 2025
1 parent 16d55ce commit 248d11d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,12 @@ public void handleRequest(InputStream inputStream, OutputStream outputStream, Co
}
case FAILURE_CALLBACK -> {
logger.info("Cancelling and reporting async failure for step {} ...", request.getStep().getGlobalStepId());
request.getStep().cancel();
try {
request.getStep().cancel();
}
catch (Exception e) {
logger.error("Error during cancellation of step {}.", request.getStep().getGlobalStepId(), e);
}
//NOTE: Assume that the error information has been injected into the status object by the callback caller already
request.getStep().reportFailure(null, false, true);
logger.info("Reported async failure for step {} failure successfully.", request.getStep().getGlobalStepId());
Expand Down

0 comments on commit 248d11d

Please sign in to comment.