Skip to content

Commit f17e773

Browse files
committed
fix handling of SuspendExecutionException in ChildContextOperation
1 parent 37c78f0 commit f17e773

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sdk/src/main/java/com/amazonaws/lambda/durable/operation/ChildContextOperation.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,10 @@ private void checkpointSuccess(T result) {
161161

162162
private void handleChildContextFailure(Throwable exception) {
163163
exception = ExceptionHelper.unwrapCompletableFuture(exception);
164+
if (exception instanceof SuspendExecutionException) {
165+
// Rethrow Error immediately — do not checkpoint
166+
ExceptionHelper.sneakyThrow(exception);
167+
}
164168
if (exception instanceof UnrecoverableDurableExecutionException) {
165169
terminateExecution((UnrecoverableDurableExecutionException) exception);
166170
}

0 commit comments

Comments
 (0)