{"action":"opened","issue":{"url":"https://api.github.com/repos/claudiajs/claudia-bot-builder/issues/11","repository_url":"https://api.github.com/repos/claudiajs/claudia-bot-builder","labels_url":"https://api.github.com/repos/claudiajs/claudia-bot-builder/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/claudiajs/claudia-bot-builder/issues/11/comments","events_url":"https://api.github.com/repos/claudiajs/claudia-bot-builder/issues/11/events","html_url":"https://github.com/claudiajs/claudia-bot-builder/issues/11","id":162443784,"number":11,"title":"Documentation around creating test JSON","user":{"login":"chiefy","id":54345,"avatar_url":"https://avatars.githubusercontent.com/u/54345?v=3","gravatar_id":"","url":"https://api.github.com/users/chiefy","html_url":"https://github.com/chiefy","followers_url":"https://api.github.com/users/chiefy/followers","following_url":"https://api.github.com/users/chiefy/following{/other_user}","gists_url":"https://api.github.com/users/chiefy/gists{/gist_id}","starred_url":"https://api.github.com/users/chiefy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chiefy/subscriptions","organizations_url":"https://api.github.com/users/chiefy/orgs","repos_url":"https://api.github.com/users/chiefy/repos","events_url":"https://api.github.com/users/chiefy/events{/privacy}","received_events_url":"https://api.github.com/users/chiefy/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-06-27T12:47:42Z","updated_at":"2016-06-27T12:47:42Z","closed_at":null,"body":"I'm kind of new to API gateway, but I am having trouble running\r\n\r\n`claudia test-lambda --event ./my-test.json`\r\n\r\n```\r\n{\r\n  \"context\": {\r\n    \"method\": \"POST\",\r\n    \"path\": \"/slack/slash-command\",\r\n    \"sourceIp\": \"test-invoke-source-ip\",\r\n    \"accountId\": \"00000000000000\",\r\n    \"apiKey\": \"test-invoke-api-key\",\r\n    \"authorizerPrincipalId\": \"\",\r\n    \"caller\": \"00000000000000\",\r\n    \"cognitoAuthenticationProvider\": \"\",\r\n    \"cognitoAuthenticationType\": \"\",\r\n    \"cognitoIdentityId\": \"\",\r\n    \"cognitoIdentityPoolId\": \"\",\r\n    \"stage\": \"test-invoke-stage\",\r\n    \"user\": \"00000000000000\",\r\n    \"userAgent\": \"Apache-HttpClient/4.3.4 (java 1.5)\",\r\n    \"userArn\": \"arn:aws:iam::00000000000000:root\"\r\n  },\r\n  \"v\": \"2\",\r\n  \"body\": {\r\n    \"text\": \"goonies\"\r\n  },\r\n  \"headers\": {\r\n    \"token\": \"zeJd9jNdslwd933jfnosd0a\"\r\n  },\r\n  \"queryString\": {},\r\n  \"env\": {\r\n    \"lambdaVersion\": \"latest\"\r\n  },\r\n  \"pathParams\": {}\r\n}\r\n```\r\n\r\nOutput:\r\n```\r\n{\r\n  \"StatusCode\": 200,\r\n  \"FunctionError\": \"Handled\",\r\n  \"Payload\": \"{\\\"errorMessage\\\":\\\"Cannot read property 'token' of undefined\\\",\\\"errorType\\\":\\\"TypeError\\\",\\\"stackTrace\\\":[\\\"/var/task/node_modules/claudia-bot-builder/lib/slack/setup.js:14:21\\\",\\\"ApiBuilder.self.router (/var/task/node_modules/claudia-bot-builder/node_modules/claudia-api-builder/src/api-builder.js:98:15)\\\"]}\"\r\n}\r\n```\r\n\r\nI have run `claudia update --configure-slack-slash-command` and updated it with the slack API token, so I am not exactly sure where I need to provide the token in my test JSON?\r\n"}}
{"actor":{"display_login":"chiefy"}}