回答編集履歴
2
AWSコンソールでのテストについて追記しました
test
CHANGED
@@ -49,3 +49,7 @@
|
|
49
49
|
});
|
50
50
|
|
51
51
|
```
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
また、Lambda のコンソールで関数のテスト(今回のケースではおそらくここが成功しません)、API Gateway のコンソールで API のテストがそれぞれできますので、今後 GoogleHome → Dialogflow → APIGateway → Lambda → Slack のようにつなげる場合は、右から順に動作テストをしていくと、原因がしぼれるので解決しやすくなります。
|
1
event.textをチェックする部分を忘れていたので修正しました
test
CHANGED
@@ -22,6 +22,14 @@
|
|
22
22
|
|
23
23
|
exports.handler = function(event, context, callback) {
|
24
24
|
|
25
|
+
if (!event.text) {
|
26
|
+
|
27
|
+
callback('called without event.text');
|
28
|
+
|
29
|
+
return;
|
30
|
+
|
31
|
+
}
|
32
|
+
|
25
33
|
var req = https.request(slack_req_opts, function (res) {
|
26
34
|
|
27
35
|
if (res.statusCode === 200) {
|