【发布时间】:2019-03-09 01:23:00
【问题描述】:
我在 heroku 上托管了一个简单的 slack slash 命令,效果很好。我把它移到了 lambda,但现在它得到了:
Darn - that slash command didn't work (error message: `400_client_error`). Manage the command at ????.
错误没有提供更多信息,也没有说明失败的原因。
我可以用 curl 到达端点,它会返回在我看来格式正确的 json:
curl -X POST \
https://5hi90e8v8e.execute-api.us-east-2.amazonaws.com/Prod \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Postman-Token: eacb33ee-96ac-457e-a325-9fdc132f808e' \
-H 'cache-control: no-cache'
{
"text": "Have suggestions to improve this bot? Message <@UC8R7PA87>",
"response_type": "in_channel"
}
标题:
Date →Sat, 09 Mar 2019 01:12:02 GMT
Content-Type →application/json
Content-Length →922
Connection →keep-alive
x-amzn-RequestId →57cec19a-4208-11e9-924c-89367de80c6d
x-amz-apigw-id →WP_jLFWYiYcFiXg=
X-Amzn-Trace-Id →Root=1-5c8312e1-327ac177db85f799dcd267c1;Sampled=0
来自旧 Heroku 端点的响应:
{
"response_type": "in_channel",
"text": "Have suggestions to improve this bot? Message <@UC8R7PA87>"
}
标题:
Connection →keep-alive
Server →gunicorn/19.6.0
Date →Sat, 09 Mar 2019 01:01:36 GMT
Content-Type →application/json
Content-Length →946
Via →1.1 vegur
关于如何找到实际错误/如何调试的任何想法?
【问题讨论】:
标签: aws-lambda slack slack-api