1 回答
- 最新
- 投票最多
- 评论最多
0
Use a Choice state to check for existence of array[0]. Something like this:
{
"StartAt": "CheckArrayEmpty",
"States": {
"CheckArrayEmpty": {
"Type": "Choice",
"Choices": [
{
"Variable": "$.array[0]",
"IsPresent": true,
"Next": "NotEmpty"
}
],
"Default": "Empty"
},
"NotEmpty": {
"Type": "Pass",
"End": true
},
"Empty": {
"Type": "Pass",
"End": true
}
}
}
Thank you for replying Uri. I came up with a work-around outside of this step function but I would still like to know about catching the error. Is this a bug in the service?