Skip to content

Commit 0535968

Browse files
committed
fix: checking exceptions in test
1 parent ee151a6 commit 0535968

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

sdk/src/main/java/com/amazonaws/lambda/durable/DurableExecutor.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,10 @@ public static <I, O> DurableExecutionOutput execute(
140140
return DurableExecutionOutput.success(outputPayload);
141141
} catch (Exception e) {
142142
Throwable cause = e.getCause() != null ? e.getCause() : e;
143+
// Check if this is a suspension, not a real failure
144+
if (cause instanceof SuspendExecutionException) {
145+
return DurableExecutionOutput.pending();
146+
}
143147
return DurableExecutionOutput.failure(cause, serDes);
144148
} finally {
145149
// We shutdown the execution to make sure remaining checkpoint calls in the queue are drained

0 commit comments

Comments
 (0)