question

Arun Pattni avatar image
Arun Pattni asked ·

Empty slot value not calling Unhandled

I have a skill that has failed certification because when an empty slot value is given, it says "There was a problem with the requested skill's response". However, I have now added an Unhandled function in Lambda, but it is still giving the same response, even though the JSON response has the text from Unhandled.

E.g:

{
	"body": {
		"version": "1.0",
		"response": {
			"outputSpeech": {
				"type": "SSML",
				"ssml": "<speak> Sorry, that is not a valid query. You can ask me for help if you need.  </speak>"
			},
			"shouldEndSession": true
		},
		"sessionAttributes": {}
	}
}

Even returning this, Alexa still says there was a problem with the skills response. The interaction model is here and the code is here

alexa skills kitresponse
10 |2000 characters needed characters left characters exceeded

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

1 Answer

Jamie Grossman avatar image
Jamie Grossman answered ·
  1. Unhandled is only called when you have an intent set in your interaction model without a handler in your code to manage it
  2. You can handle the null slot value issue with your above messaging, but with something like below in the relevant intent that gets called:
if (slot == null)
  //sorry i didnt quite get that
else (slot != null)
  //slot isn't empty
10 |2000 characters needed characters left characters exceeded

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