question

roda0313 avatar image
roda0313 asked

A problem with the requested skills response?

I have an intent to reset an accounts password. A few days ago it was working fine, but then suddenly, without any change to the code or skill, it has just stopped working. Whenever the intent is now called, Alexa responds with "There was a problem with the requested skill's response". Below is the JSON response it is claiming to be invalid:

{
	"body": {
		"version": "1.0",
		"response": {
			"outputSpeech": {
				"type": "SSML",
				"ssml": "<speak> You are about to send a password reset request. Are you sure you wish to proceed? </speak>"
			},
			"card": {
				"type": "Simple",
				"title": "Password Reset Request",
				"content": "You are about to send a password reset request. Are you sure you wish to proceed?"
			},
			"directives": [
				{
					"type": "Dialog.ConfirmIntent"
				}
			],
			"reprompt": {
				"outputSpeech": {
					"type": "SSML",
					"ssml": "<speak> You are about to send a password reset request. Are you sure you wish to proceed? </speak>"
				}
			},
			"shouldEndSession": false
		},
		"sessionAttributes": {},
		"userAgent": "ask-nodejs/1.0.25 Node/v6.10.3"
	}
}

This response is a simple confirmation before continuing with the reset request.

Again, this intent was working perfectly fine a few days ago so I am sure that the code is working fine. I am using AWS lambda to host this skill, using nodejs code as the backbone. Below is the nodejs code that is generating this response:

const intentObj = this.event.request.intent;
        if (intentObj.confirmationStatus !== 'CONFIRMED') {
            if (intentObj.confirmationStatus !== 'DENIED') {
                // Intent is not confirmed
                const speechOutput = 'You are about to send a password reset request. Are you sure you wish to proceed?'
                const cardTitle = 'Password Reset Request';
                this.emit(':confirmIntentWithCard', speechOutput, speechOutput, cardTitle, speechOutput);
            } else {
                // Users denies the confirmation of intent
                const speechOutput = 'OK';
                this.emit(':tellWithCard', speechOutput, speechOutput);
            }
        } else { ... }

Did I miss some breaking change in the Alexa SDK?

alexa skills kitintentsresponsenodejs
1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Jamie Grossman avatar image Jamie Grossman ♦♦ commented ·

Have you tested the lambda function? Does it work if you try configuring a test event?

0 Likes 0 ·

0 Answers