interface CatchProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.StepFunctions.CatchProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsstepfunctions#CatchProps |
![]() | software.amazon.awscdk.services.stepfunctions.CatchProps |
![]() | aws_cdk.aws_stepfunctions.CatchProps |
![]() | aws-cdk-lib » aws_stepfunctions » CatchProps |
Error handler details.
Example
// 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
Name | Type | Description |
---|---|---|
assign? | { [string]: any } | Workflow variables to store in this step. |
errors? | string[] | Errors to recover from by going to the given state. |
outputs? | any | This option for JSONata only. |
result | string | JSONPath expression to indicate where to inject the error data. |
assign?
Type:
{ [string]: any }
(optional, default: Not assign variables)
Workflow variables to store in this step.
Using workflow variables, you can store data in a step and retrieve that data in future steps.
errors?
Type:
string[]
(optional, default: All errors)
Errors to recover from by going to the given state.
A list of error strings to retry, which can be either predefined errors (for example Errors.NoChoiceMatched) or a self-defined error.
outputs?
Type:
any
(optional, default: $states.result or $states.errorOutput)
This option for JSONata only.
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.
resultPath?
Type:
string
(optional, default: $)
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.