我们有这样的 Cloud Workflows 配方设置:
- readWikipedia:
call: http.post
args:
url: https://api-ssl.bitly.com/v4/shorten
headers:
Authorization: "Bearer <token>"
Content-type: "application/json"
body:
domain: bit.ly
long_url: https://cloud.google.com/blog
result: bitresult
- returnResult:
return: ${bitresult.body[0]}
我们得到一个错误:TypeError: dictionary key must be a string; got: int
这是我们得到的完整回复:
argument: 'null'
endTime: '2020-10-16T17:40:17.595823493Z'
error:
context: in step "returnResult"
payload: '{"message":"TypeError: dictionary key must be a string; got: int","tags":["TypeError"]}'
name: projects/985596417983/locations/us-central1/workflows/http_post/executions/5bfc56c0-b498-4149-9d28-2c0d51295a9a
startTime: '2020-10-16T17:40:17.297154818Z'
state: FAILED
workflowRevisionId: 000006-e18