I am receiving the error:
An error has occurred: Invalid Lambda Response: Received error response from Lambda: Handled.
from lex from my lambda function, I am trying out the code in https://github.com/awslabs/amz-ai-building-better-bots,
The Lambda function when tried with the test event returns the expected output below, directing lex to elicit the next slot, but lex throws the above error.
Lambda test output:
{
"sessionAttributes": {},
"dialogAction": {
"type": "ElicitSlot",
"intentName": "cafeOrderBeverageIntent",
"slots": {
"BeverageType": "mocha",
"BeverageStrength": null,
"Creamer": null,
"BeverageSize": null,
"BeverageTemp": null,
"BeverageExtras": null
},
"slotToElicit": "BeverageSize"
}
}
Looked into the lex developer guide and this response has all the expected fields for the output format,
Should the "fulfillmentState" be sent with the dialogaction elicitslot as well? Currently this is not being sent.
Test event input:
{
"messageVersion": "1.0",
"invocationSource": "DialogCodeHook",
"userId": "test-1",
"sessionAttributes": {},
"bot": {
"name": "CoffeeBot",
"alias": null,
"version": "$LATEST"
},
"outputDialogMode": "Text",
"currentIntent": {
"name": "cafeOrderBeverageIntent",
"slots": {
"BeverageType": "mocha",
"BeverageStrength": null,
"Creamer": null,
"BeverageSize": null,
"BeverageTemp": null,
"BeverageExtras": null
},
"confirmationStatus": "None"
}
}