1
votes

I have a simple utterance with a slot, e.g.

Start {function}

This function is defined as a custom slot type which can take two values, a and b. So if the user types in c for example, I simply want to keep asking them to reenter the data. I have made the slot type as required in the console and I can successfully tell if the value is not one from the list. What I am having trouble with is, what do I show next...I have tried this:

return handlerInput.responseBuilder .addDelegateDirective(currentIntent) .getResponse();

And

return handlerInput.responseBuilder .prompt('Wrong input') .addElicitSlotDirective(SLOT_NAME) .getResponse();

But both of the above keep hitting my error handler. Is there an example online for this? Or can anyone help me out?

1

1 Answers

0
votes

From the documentation here, ask-core-docs it seems that the appropriate syntax for what you are trying to do is addElicitSlotDirective(slotToElicit: string, updatedIntent?: Intent), which might explain why your code execution keeps hitting the error handler, please try changing it and let me know if that fixes your problem