Why is does my step function stop executing instead of following the Catch #1 path?
>Solution :
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 applyInputPathorOutputPathon anullJSON payload. AStates.Runtimeerror isn’t retriable, and will always cause the execution to fail. A retry or catch onStates.ALLwon’t catchStates.Runtimeerrors.
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 .

