javascriptnode.jsamazon-web-servicesalexa-skills-kitjovo-framework

Alexa activates intent even though the slot.value does not exist in the JSON file


So I have this intent:

    'PlayRadioIntent': function(channel) {
    
                
               
                this.setSessionAttribute('RadioName', channel);
                this.followUpState('PlayConfirmationState')
                .ask('Do you want me to play your stupid ' + channel.value);
                

            },

Which is activated if the user says : I want to listen to slot:radio_name.
When I test it with:
I want to listen to eaaehae.
Alexa replies with:
There was a problem with the requested skill's response.
Which makes perfect sense since eaaehar does not exist in the radios database that I have provided*


The problem is that when I test it with:
I want to listen to eaaehae radio.
Alexa replies with:
Do you want me to play your stupid eaaehae radio.
This doesn't make any sense since eaaehae radio does not exist in the radios database that I have provided
Does anyone know what might be causing this issue. Thank you :)


Solution

  • There was a problem with the requested skill's response. Which makes perfect sense since eaaehar does not exist in the radios database that I have provided*

    Whenever Alexa respond back with "There was a problem with the requested skill's response" It only means that your code was unable to provide a valid response. Be it an error message or an expected response you are supposed to send back only a valid response.

    In your case, you need to validate the slot-values you receive in radio_name slot with the expected values from you database and send back a valid response.