Closed kopertop closed 1 year ago
It looks like the correct code to use is JsonPath.DISCARD
rather than just DISCARD
. Solution may be to remove the extraneous DISCARD
value that's also included, and update the documentation in the addCatch
function to indicate using JsonPath.DISCARD
Thanks for reporting the issue
I couldn't find anywhere that we use this variable https://github.com/aws/aws-cdk/blob/eea12ea799973dff27aa4dedf03221e277ebaa0c/packages/aws-cdk-lib/aws-stepfunctions/lib/types.ts#L160
I'm not sure if this constant has any legitimate use cases - I can't find anywhere it's being used within our codebase, and we only document JsonPath.DISCARD
in the readmes and snippets. If it doesn't have any legitimate use cases, we should deprecate it, and perhaps make it more clear in the CatchProps
snippet that we want JsonPath.DISCARD
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
The LambdaInvoke package allows for an
addCatch
which is documented as allowing aCatchProps
to include aresultPath
special value ofDISCARD
HOWEVER, when trying to add a catch with this special value of
DISCARD
for theresultPath
it tosses an error:Expected Behavior
The step function definition should use the special
null
value as the resultPath when passed the specialDISCARD
value.Current Behavior
Attempted deploy causes the CDK to fail during validation:
Reproduction Steps
then run
cdk synth
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.91.0 (build eea12ea)
Framework Version
No response
Node.js Version
v18.17.0
OS
Darwin razorcrest.local 22.5.0 Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:23 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6020 arm64
Language
Typescript
Language Version
TypeScript (5.1.6)
Other information
No response