How does exception handling works in AWS Stepfunction?

168 Views Asked by At

I faced a throttling exception while running a Glue job through Step Functions, and to handle it, I added a retry block for the "AWSGlueException" error (which is the superclass exception, as described here: https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/glue/model/AWSGlueException.html). While testing, I encountered another exception which is Glue.ValidationException, but my Step Function did not retry because I hadn't explicitly specified that exception. So, my question is if subclass exceptions are not automatically handled by the superclass exception in Step Functions?

1

There are 1 best solutions below

0
On

No, Step Functions won't retry in this case. For Step Functions, the error is just an opaque string that can originate anywhere, it doesn't know about the concept of exceptions and their inheritance. It's stated pretty clearly in the Error handling in Step Functions documentation.