Skip to content
v2.274.0

CatchProps Struct ​

Error handler details.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_stepfunctions as stepfunctions } from 'aws-cdk-lib';

declare const assign: any;
declare const outputs: any;
const catchProps: stepfunctions.CatchProps = {
  assign: {
    assignKey: assign,
  },
  errors: ['errors'],
  outputs: outputs,
  resultPath: 'resultPath',
};

Properties ​

assignoptional{ [key: string]: any }assignoptionaltyping.Mapping[str, Any]assignoptionalMap<String, Object>AssignoptionalIDictionary<string, object>Assignoptional*map[string]interface{}#
Workflow variables to store in this step.

Default: Not assign variables

Using workflow variables, you can store data in a step and retrieve that data in future steps.

errorsoptionalstring[]errorsoptionaltyping.List[str]errorsoptionalList<String>Errorsoptionalstring[]Errorsoptional*[]*string#
Errors to recover from by going to the given state.

Default: All errors

A list of error strings to retry, which can be either predefined errors (for example Errors.NoChoiceMatched) or a self-defined error.

outputsoptionalanyoutputsoptionalAnyoutputsoptionalObjectOutputsoptionalobjectOutputsoptionalinterface{}#
This option for JSONata only.

Default: $states.result or $states.errorOutput

notes

When you use JSONPath, then the state ignores this property. Used to specify and transform output from the state. When specified, the value overrides the state output default. The output field accepts any JSON value (object, array, string, number, boolean, null). Any string value, including those inside objects or arrays, will be evaluated as JSONata if surrounded by {% %} characters. Output also accepts a JSONata expression directly.

resultPathoptionalstringresult_pathoptionalstrresultPathoptionalStringResultPathoptionalstringResultPathoptional*string= $#
JSONPath expression to indicate where to inject the error data.

May also be the special value JsonPath.DISCARD, which will cause the error data to be discarded.