File tree Expand file tree Collapse file tree
sdk/src/main/java/software/amazon/lambda/durable/exception Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88/** Exception thrown when a step with AT_MOST_ONCE_PER_RETRY semantics was started but interrupted before completion. */
99public class StepInterruptedException extends StepException {
10+ private static final String ERROR_TYPE = StepInterruptedException .class .getName ();
11+
1012 public StepInterruptedException (Operation operation ) {
11- super (operation , toErrorObject (), formatMessage (operation ));
13+ super (operation , toErrorObject (operation ), formatMessage (operation ));
1214 }
1315
1416 public static boolean isStepInterruptedException (ErrorObject errorObject ) {
1517 if (errorObject == null ) {
1618 return false ;
1719 }
18- return StepInterruptedException . toErrorObject (). errorType () .equals (errorObject .errorType ());
20+ return ERROR_TYPE .equals (errorObject .errorType ());
1921 }
2022
21- private static ErrorObject toErrorObject () {
23+ private static ErrorObject toErrorObject (Operation operation ) {
2224 return ErrorObject .builder ()
23- .errorType (StepInterruptedException .class .getName ())
25+ .errorType (ERROR_TYPE )
26+ .errorMessage (formatMessage (operation ))
2427 .build ();
2528 }
2629
You can’t perform that action at this time.
0 commit comments