Open roschler opened 6 years ago
Please make a PR, we can look at the actual change.
@dblock Just did:
+1 on this doc change. I spent several hours struggling with the promise resolve until I read the above. Thx @roschler !
Thanks! Please make a PR into the root project (aka here) @roschler.
I used these docs to develop my intent handler that requires an asynchronous call to an external server:
https://www.npmjs.com/package/alexa-app#asynchronous-handlers-example
The docs give this code sample as an example of an async call inside an alexa-app intent handler:
I think the docs need a fully fleshed out Promise example. In order to get the body of my Promise working I had to make an explicit call to resolve(response) when I was done. Without that call, alexa-app returned an ERROR to Alexa with an empty payload and the end session flag set to true.
Perhaps something like this?:
If you want me to fork the repo and make a pull request I'm happy to do that, but I'd like to get your comments first before doing that.