gpt4 book ai didi

amazon-web-services - AWS Step Functions 未捕获 States.Runtime 错误

转载 作者:行者123 更新时间:2023-12-03 07:38:42 28 4
gpt4 key购买 nike

下面的 step 函数在 aws 中执行,当缺少必需的参数时,它会取消流程并抛出 States.Runtime 错误。这是在 step 函数的 catch 阶段,但它没有像所述的那样捕获错误。

定义的阶跃函数如下,

{
"StartAt": "Log Start Step Function",
"Comment": "Executed with inputs",
"States": {
"Log Start Step Function": {
"Type": "Task",
"Resource": "arn:aws:lambda:eu-west-1:0000000:function:update",
"Parameters": {
"body": {
"itemID.$": "$.itemID",
"functionName.$": "$.stepFunctionName ",
"executionARN.$": "$$.Execution.Id",
"complete": false,
"inprogress": true,
"error": false
}
},
"Catch": [
{
"ErrorEquals": [
"States.Runtime"
],
"ResultPath": "$.taskresult",
"Next": "Log Failed Module"
},
{
"ErrorEquals": [
"States.ALL"
],
"ResultPath": "$.taskresult",
"Next": "Log Failed Module"
}

],
"ResultPath": "$.taskresult",
"Next": "Evaluate Module PA1"
}
}
}

下面是阶跃函数, enter image description here

抛出的错误如下,
enter image description here

运行时错误未执行记录失败的模块。
{
"ErrorEquals": [
"States.Runtime"
],
"ResultPath": "$.taskresult",
"Next": "Log Failed Module"
},

这是 AWS 错误还是此处完成的配置有问题,或者是否有任何其他方法可以验证 AWS Step Functions 中的参数

最佳答案

来自 https://docs.aws.amazon.com/step-functions/latest/dg/concepts-error-handling.html

A States.Runtime error is not retriable, and will always cause the execution to fail. A retry or catch on States.ALL will not catch States.Runtime errors.

关于amazon-web-services - AWS Step Functions 未捕获 States.Runtime 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62340479/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com