Reputation: 16015
Why is does my step function stop executing instead of following the Catch #1
path?
Upvotes: 0
Views: 573
Reputation: 57184
Because you cannot catch States.Runtime
errors. The docs state
States.Runtime An execution failed due to some exception that it couldn't process. Often these are caused by errors at runtime, such as attempting to apply
InputPath
orOutputPath
on anull
JSON payload. AStates.Runtime
error isn't retriable, and will always cause the execution to fail. A retry or catch onStates.ALL
won't catchStates.Runtime
errors.
You tried accessing FaceDetails[0]...
but there aren't any FaceDetails
in your state.
Instead of catching this error you should put a Choice
state after the DetectFace
to determine whether you actually found a face and only then forward that face detection to the lambda. You can use a IsPresent
check for $.FaceDetails[0]
: https://stackoverflow.com/a/65693332/2442804 .
Upvotes: 2