I have a lambda function invoked by a step function. Internally, the lambda calls an api and catches errors.
However, if the api call fails, I would like to throw/ return a TaskFailed error to the step function, so it can retry later. How would I go about this? (Or is there another way to get the step to retry itself later?)