bug: Inline Map turns a nested States.TaskFailed into an invalid custom error name #62
Replies: 1 comment 1 reply
|
Retested on 2026-10-11 against a fresh, unmodified The child workflow intentionally fails. The parent inline Map invokes it with This was a public IAM/Step Functions API reproducer in a separate stock container, with no source patches, extensions, or Docker socket mount. The disposable executions, state machines, role and container were cleaned up afterward. Resolved image index: |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Additional version check — 2026-10-08
Still reproduced: the same nested task failure becomes
States.Runtimewith the invalid-custom-error-name diagnostic.The comparison used an unmodified
localstack/localstack-pro:2026.8.1Linux ARM64 image,repository digest
sha256:4aef81c531684570d7b3cfd2805afa02194c929d52bbeedabb7d4874798b1572.Vendor packages were
localstack-core 2026.8.1,moto-ext 5.1.48, and bundledboto3/botocore 1.43.78. HTTP probes used a separateboto3/botocore 1.43.101client; the process-local security-group probe used the bundled interpreter.
The same scripts were used, with no custom extensions or provider source changes.
Owned test containers and the disposable network were removed.
This is a second specifically tested version, not a claim to have tested the latest release.
Existing report search
I searched the LocalStack issue tracker and current organization Discussions for this operation and failure. I did not find an existing report for this exact reproduction.
Current behavior
A child Standard workflow deliberately fails with the custom error
ReproFailure. A parent inline Map invokes it througharn:aws:states:::states:startExecution.sync:2and catchesStates.TaskFailed.Instead of reaching that catch, execution fails with
States.Runtimeand the diagnostic:The workflow did not define a custom error named
States.TaskFailed; that error is generated by the nested service integration.This was reproduced through public APIs on a fresh, unmodified LocalStack container.
Expected behavior
The built-in task failure should propagate through the Map and reach its
States.TaskFailedcatch, retaining the child'sReproFailurecause. The parent should then finish successfully through itsCaughtstate. The reserved-prefix restriction should continue to apply to actual custom error names.Reference: Step Functions error handling.
Related but distinct: closed issue #10489 concerns definition-time handling of
States.DataLimitExceeded. This reproduction creates the definition successfully and fails at runtime while propagating an inline Map iteration's built-in error.Environment
localstack/localstack-pro:2026.7.5.sha256:0d74e1d2d7ce13a3cb25fc64cf15eb225f1c95c762e56e057bc6a9ed0ed29306.localstack-core 2026.7.5,moto-ext 5.1.46,moto.__version__ = 5.1.21.dev,boto3/botocore 1.43.51.Fresh confirmation on 2026-10-08: the same discrepancy reproduced on Linux ARM64 against the same unmodified image, using a separate
boto3/botocore 1.43.101client. The disposable container and network were removed after the run. The startup block below includes the run's disabled DNS listener/default EC2-image downloads and temporary state storage; no provider source or extension was changed.Steps to reproduce
Start a disposable instance on a free loopback port:
Run the block in a disposable shell. Port 4567 must be free. The client needs
boto3; it uses only dummy credentials and a loopback endpoint. It creates disposable resources and cleans them up infinally; the shell trap removes the container even when the script reports failure. A nonzero exit is expected while the reported discrepancy is present. No Docker socket mount or application services are required.Complete standalone reproducer: stepfunctions_map_task_failure.py
All reactions