Returning handler.ResponseBuilder from promise.then() method
In one of the intent handler for my Alexa skill I have to return response once my promise is resolved. Code looks like this : var rcvPromise = receiveMsgQ(); rcvPromise.then(function(speechText) { console.log('rcv Promise resolved with ',speechText); return handlerInput.responseBuilder .speak(speechText) .withSimpleCard('skill_name', speechText) .withShouldEndSession(false) .getResponse(); }); Skill returns with ERROR message with no additional details about error. Is there any way to fix this problem? PS: I need to use promise as receiveMsgQ() is asynchronous function call. The error you're