fix(stepfunctions): preserve Lambda service errors in tasks (#4845)

This commit is contained in:
Cornelle Janse van Rensburg authored and GitHub committed 2026-10-02 16:48:32 -04:00
1 parent 6172451e0b
commit 39867e6bcb
2 files changed
+245 -1

No files matched your search

@@ -1124,7 +1124,12 @@ public class AslExecutor {
byte[] payloadBytes = objectMapper.writeValueAsString(lambdaPayload).getBytes();
reportCustomResourceLiveness(payloadBytes);
InvokeResult result = lambdaExecutor.invoke(fn, payloadBytes, InvocationType.RequestResponse);
InvokeResult result;
try {
result = lambdaExecutor.invoke(fn, payloadBytes, InvocationType.RequestResponse);
} catch (AwsException e) {
throw new FailStateException("Lambda." + e.getErrorCode(), e.getMessage());
}
if (result.getFunctionError() != null) {
throw lambdaFunctionFailure(functionName, result);