question

newuser-0c394551-b18e-43e7-ae14-4431e59ae0ad avatar image

Error message "Expecting request type of IntentRequest but got CanFulfillIntentRequest"

I implemented CanFulfillIntentRequest according to the instruction, but whenever I tested it using Manual Json at developer console, I got the error message "Expecting request type of IntentRequest but got CanFulfillIntentRequest".

Why and when is this message sent?


Error message is shown as below.

2021-02-23T22:22:21.334Z    6739cd05-2d75-4cd5-8f55-a2b0c6cb8cf8    INFO    CFIR Error stack: AskSdk.RequestEnvelopeUtils Error: Expecting request type of IntentRequest but got CanFulfillIntentRequest.    at Object.createAskSdkError (/var/task/node_modules/ask-sdk-runtime/dist/util/AskSdkUtils.js:22:17)    at Object.getIntentName (/var/task/node_modules/ask-sdk-core/dist/util/RequestEnvelopeUtils.js:56:29)    at Object.canHandle (/var/task/index.js:142:22)    at GenericRequestMapper.<anonymous> (/var/task/node_modules/ask-sdk-runtime/dist/dispatcher/request/mapper/GenericRequestMapper.js:70:61)    at step (/var/task/node_modules/ask-sdk-runtime/dist/dispatcher/request/mapper/GenericRequestMapper.js:45:23)    at Object.next (/var/task/node_modules/ask-sdk-runtime/dist/dispatcher/request/mapper/GenericRequestMapper.js:26:53)    at fulfilled (/var/task/node_modules/ask-sdk-runtime/dist/dispatcher/request/mapper/GenericRequestMapper.js:17:58) 


I used the Json file as below when testing CanFulfillIntentRequest.

{
"session":{
"new": true,
"sessionId":"SessionId.150a5662-8403-4774-94bf-1058a61d9506",
"application":{
"applicationId":"amzn1.ask.skill.38fd7289-1c28-44d7-a3ea-xxxxxxxx"
},
"attributes":{
"key": "string value"
},
"user":{
"userId": "amzn1.ask.account.xxxxxxx",
"accessToken": "xxxxxxxx"
}
},
"request":{
"type":"CanFulfillIntentRequest",
"requestId":"EdwRequestId.xxxxxxxx",
"intent":{
"name":"DeviceControlIntent",
"slots":{
"main_function":{
"name":"main_function",
"value":"mesh"
},
"function_control":{
"name":"function_control",
"value":"on"
}
}
},
"locale":"en-US",
"timestamp":"2021-02-19T11:02:29Z"
},
"context":{
"AudioPlayer":{
"playerActivity":"IDLE"
},
"System":{
"application":{
"applicationId":"amzn1.ask.skill.xxxxxxxx"
},
"user":{
"userId": "amzn1.ask.account.xxxxxxxx",
"accessToken": "xxxxxxxx"
},
"device":{
"supportedInterfaces":{

}
}
}
},
"version":"1.0"
}


Do I need to apply "NFI Toolkit Preview" to deal with "CanFulfillIntentRequest"?

If yes, I think I'm not eligible for applying NFI Toolkit because my skill is still in development phase. Am I correct?

canfulfillintentrequestname-free interaction
10 |5000

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

1 Answer

Vivek Goswami avatar image
Vivek Goswami answered

CanFulFillIntentRequest (CFIR) was available before NFI toolkit preview. You need not apply for NFI toolkit to use CFIR feature.

10 |5000

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