Currently, I have a verification process in every Intent. The lambda initialization & verification function verifies if the user currently has sessionAttributes. If it doesn't, it will proceed to another function that verifies them through Cognito. If it exists, it will use delegate() to continue.
The problem is: If i use delegate, it will be stuck asking for a slot value instead of proceeding to error handling.
For example: If the current Intent is the 'menu':
Menu:
- Check News
- Buy Products
Please select one of the options:
If the user types:
Random text
It is supposed to proceed to error handling, and Lex will say to the user it did not understand. Instead, it will always keep displaying the Menu until one of the options is selected (because of the delegate function). I've tried to use ElicitIntent, but that just doesn't detect anything and gives the error.
Is there any way around this?
I found the answer: Fallback Intent