fix: 补充Lambda节点HTTP请求空结果错误提示
This commit is contained in:
@@ -875,6 +875,8 @@ func HttpNode(ctx context.Context, nodeInput *flowDto.NodeExecutionInput) ([]nod
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var e = ""
|
||||
|
||||
finalResult := make(map[string]any)
|
||||
if responseType == "sync" {
|
||||
httpResultJson := gconv.String(rawHttpResult)
|
||||
@@ -884,6 +886,7 @@ func HttpNode(ctx context.Context, nodeInput *flowDto.NodeExecutionInput) ([]nod
|
||||
finalResult[key] = gjson.Get(httpResultJson, path).Value()
|
||||
}
|
||||
}
|
||||
e = fmt.Sprintf("%v", httpResultJson)
|
||||
}
|
||||
if responseType == "callback" {
|
||||
var waitResult any
|
||||
@@ -910,11 +913,16 @@ func HttpNode(ctx context.Context, nodeInput *flowDto.NodeExecutionInput) ([]nod
|
||||
}
|
||||
}
|
||||
}
|
||||
e = fmt.Sprintf("%v", bodyStr)
|
||||
}
|
||||
if responseType == "pull" {
|
||||
|
||||
}
|
||||
|
||||
if g.IsEmpty(finalResult) {
|
||||
return nil, fmt.Errorf("http请求异常,返回结果为空:%v", e)
|
||||
}
|
||||
|
||||
outputRes := make([]node.NodeFormField, 0)
|
||||
for i, item := range finalResult {
|
||||
if nodeInput.Config.IsSaveFile {
|
||||
|
||||
Reference in New Issue
Block a user