# CatchProps

Error handler details.

- Source: [`aws-stepfunctions/lib/types.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-stepfunctions/lib/types.ts#L164)
- Type last changed: v2.178.0 · 6 Feb 2025

## 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

- `assign`: { [key: string]: any } — 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.

- `errors`: 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.

- `outputs`: any — This option for JSONata only.

  **Default:** $states.result or $states.errorOutput

  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`: 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.
