Alexa技能测试错误:错误已处理:无法读取未定义的属性’value’。

huangapple go评论123阅读模式
英文:

Alexa skill testing error: Error handled: Cannot read property 'value' of undefined

问题

Here is the translated code:

请帮助我如果有人解决了问题以下是我的 Lambda 函数代码
当我在 `exports.handler` 函数中注释掉所有函数并执行/测试单个函数时它能正常工作但如果启用所有函数我会收到错误**错误处理无法读取未定义的属性 "value"**

这是用于 Alexa 技能工具包的 Node.js 代码用于不同的意图创建

GetNewFactHandler,
CreateJIRAIssueHandler,
UpdateJIRAIssueHandler,
GetJIRAIssueHandler,
GetJIRAIssueCountHandler,

/* eslint-disable func-names */
/* eslint-disable no-console */
var http = require('http');
var https = require('https');

var projectKey = '';
var iType = '';
var keyValueID = '';
var userName = '';
var IssueNumber = '';

const Alexa = require('ask-sdk');

const GetNewFactHandler = {
  canHandle(handlerInput) {
    const request = handlerInput.requestEnvelope.request;
    return request.type === 'LaunchRequest'
      || (request.type === 'IntentRequest'
        && request.intent.name === 'GetNewFactIntent');
  },
  handle(handlerInput) {
    const factArr = data;
    const factIndex = Math.floor(Math.random() * factArr.length);
    const randomFact = factArr[factIndex];
    const speechOutput = GET_FACT_MESSAGE + randomFact;

    return handlerInput.responseBuilder
      .speak(speechOutput)
      .withSimpleCard(SKILL_NAME, randomFact)
      .getResponse();
  },
};

var reqTimeout = 3000;

const CreateJIRAIssueHandler = {
    canHandle(handlerInput) {
        const request = handlerInput.requestEnvelope.request;
        const proKey = request.intent.slots.PROJECTKEY.value;
        const issueType = request.intent.slots.ISSUETYPE.value;
        iType = capitalize_Words(issueType);
        projectKey = proKey.toUpperCase();
        return request.type === 'IntentRequest' &&
            request.intent.name === 'CreateJIRAIssue';
    },
    async handle(handlerInput) {
        const createIssue = await createJiraIssue(projectKey, iType);
        const speechOutput = JSON.parse(createIssue).key;
        return handlerInput.responseBuilder
            .speak('Issue ' + speechOutput + ' created')
            .getResponse();
    },
};

function capitalize_Words(str) {
    return str.replace(/\w\S*/g, function(txt) {
        return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
    });
};

// Mule 实时服务器
var muleCreateIssuePath = '/jira/createissue';
var muleProtocol = 'https';
var createIssueMethod = 'POST';
var muleUpdateIssuePath = '/jira/issue/';
var updateIssueMethod = 'PUT';
var getIssueMethod = 'GET';

var MuleReqOpts = {
    host: '',
    port: 443,
    path: undefined, // 需要设置。
    method: undefined,
    headers: {
        'Content-Type': 'application/json'
    },
    agent: false,
    // auth: jiraUsername + ':' + jiraPassword
    auth: ''
};

var MuleHttp = muleProtocol === 'https' ? https : http;

function createJiraIssue(projectKey, iType) {

    MuleReqOpts.path = muleCreateIssuePath;
    MuleReqOpts.method = createIssueMethod;

    var MuleReqBody = {
        'fields': {
            'project': {
                'key': projectKey
            },
            'summary': 'Test Message',
            'description': 'Issue created for alexa skill kit from Integration alexa to jira',
            'issuetype': {
                'name': iType // 请确保您的 JIRA 项目配置支持此问题类型。
            }
        }
    };

    return doApiCall(MuleHttp, MuleReqOpts, MuleReqBody, 'creating issue', 201);
};

function doApiCall(httplib, reqOpts, reqBody, happening, successCode) {
    return new Promise(((resolve, reject) => {
        var req = httplib.request(reqOpts, (res) => {
            res.setEncoding('utf8');
            let returnData = '';
            res.on('data', (chunk) => {
                returnData += chunk;
            });
            res.on('end', () => {
                resolve(returnData);
            });
            res.on('error', (error) => {
                reject(error);
            });
        });
        req.write(JSON.stringify(reqBody));
        req.end();

        req.on('error', function(err) {
            context.done(new Error(' request error: ' + err.message));
        });
        req.setTimeout(reqTimeout, function() {
            context.done(new Error(' request timeout after ' + reqTimeout + ' milliseconds.'));
        });
    }));
};

const UpdateJIRAIssueHandler = {

    canHandle(handlerInput) {
        console.log('1');

        const request = handlerInput.requestEnvelope.request;
        console.log('2');

        userName = request.intent.slots.USER.value;

        var keyValue = request.intent.slots.PROJECTKEY.value;
        console.log('keyValue : ' + keyValue);

        keyValueID = keyValue.toUpperCase();
        IssueNumber = request.intent.slots.ISSUENUMBER.value;
        let INumber = Number(IssueNumber);
        console.log('IssueNumber value:' + INumber);

        console.log('key value id: ' + keyValueID);
        return request.type === 'IntentRequest' &&
            request.intent.name === 'UpdateJIRAIssue';
    },
    async handle(handlerInput) {
        const updateIssue = await updateJiraIssue(userName);
        console.log('updateIssue log: ' + updateIssue);

        const speechOutput = JSON.parse(updateIssue).responseMessage;
        console.log('speechOutput log: ' + speechOutput);
        return handlerInput.responseBuilder
            .speak(speechOutput)
            .getResponse();
    },
};

function updateJiraIssue(userName) {
    console.log('inside method: ' + userName);
    MuleReqOpts.method = updateIssueMethod;

    var postdata = {
        "fields": {
            "assignee": {
                "name": userName
            }
        }
    }

    return doApiUpdateCall(MuleHttp, MuleReqOpts, postdata, 'updating issue', 201);
};

function doApiUpdateCall(httplib, options, postdata, happening, successCode) {

    options.path = muleUpdateIssuePath + keyValueID + '-' + IssueNumber;

    return new Promise(((resolve, reject) => {

        var req = httplib.request(options, (res) => {
            console.log(options);

            res.setEncoding('utf8');
            let returnData = '';
            res.on('data', (body) => {
                returnData += body;
                console.log(returnData);

            });
            res.on('end', () => {
                resolve(returnData);
            });
            console.log('1');
            console.log('Body:');
        });

        req.on('error', function(e) {
            console.log('problem with request: ' + e.message);
        });

        var

<details>
<summary>英文:</summary>

Please help me if any body resolved the issue and below is my lambda funciton code.
when i comment all funcitons in exports.handler funciton and execute/test single function it is working but if we enable all funcitons then i am getting the error as **Error handled: Cannot read property &#39;value&#39; of undefined**
    
    Node JS code for alexa skill kit for different intents created.
    
    GetNewFactHandler,
        CreateJIRAIssueHandler,
        UpdateJIRAIssueHandler,
        GetJIRAIssueHandler,
        GetJIRAIssueCountHandler,
    
    
    /* eslint-disable  func-names */
    /* eslint-disable  no-console */
    var http = require(&#39;http&#39;);
    var https = require(&#39;https&#39;);
    
    var projectKey=&#39;&#39;;
    var iType=&#39;&#39;;
    var keyValueID=&#39;&#39;;
    var userName=&#39;&#39;;
    var IssueNumber=&#39;&#39;;
    
    const Alexa = require(&#39;ask-sdk&#39;);
    
    const GetNewFactHandler = {
      canHandle(handlerInput) {
        const request = handlerInput.requestEnvelope.request;
        return request.type === &#39;LaunchRequest&#39;
          || (request.type === &#39;IntentRequest&#39;
            &amp;&amp; request.intent.name === &#39;GetNewFactIntent&#39;);
      },
      handle(handlerInput) {
        const factArr = data;
        const factIndex = Math.floor(Math.random() * factArr.length);
        const randomFact = factArr[factIndex];
        const speechOutput = GET_FACT_MESSAGE + randomFact;
    
        return handlerInput.responseBuilder
          .speak(speechOutput)
          .withSimpleCard(SKILL_NAME, randomFact)
          .getResponse();
      },
    };
    
    
    var reqTimeout = 3000;
    
    const CreateJIRAIssueHandler = {
        canHandle(handlerInput) {
            const request = handlerInput.requestEnvelope.request;
            const proKey = request.intent.slots.PROJECTKEY.value;
            const issueType = request.intent.slots.ISSUETYPE.value;
            iType = capitalize_Words(issueType);
            projectKey = proKey.toUpperCase();
            return request.type === &#39;IntentRequest&#39; &amp;&amp;
                request.intent.name === &#39;CreateJIRAIssue&#39;;
        },
        async handle(handlerInput) {
            const createIssue = await createJiraIssue(projectKey, iType);
            const speechOutput = JSON.parse(createIssue).key;
            return handlerInput.responseBuilder
                .speak(&#39;Issue &#39; + speechOutput + &#39; created&#39;)
                .getResponse();
        },
    };
    
    function capitalize_Words(str) {
        return str.replace(/\w\S*/g, function(txt) {
            return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();
        });
    };
    
    //mule real time server
    var muleCreateIssuePath = &#39;/jira/createissue&#39;;
    var muleProtocol = &#39;https&#39;;
    var createIssueMethod = &#39;POST&#39;;
    var muleUpdateIssuePath = &#39;/jira/issue/&#39;;
    var updateIssueMethod = &#39;PUT&#39;;
    var getIssueMethod = &#39;GET&#39;;
    
    var MuleReqOpts = {
        host: &#39;&#39;,
        port: 443,
        path: undefined, // To be set.
        method: undefined,
        headers: {
            &#39;Content-Type&#39;: &#39;application/json&#39;
        },
        agent: false,
        // auth: jiraUsername + &#39;:&#39; + jiraPassword
        auth: &#39;&#39;
    
    };
    
    var MuleHttp = muleProtocol === &#39;https&#39; ? https : http;
    
    function createJiraIssue(projectKey, iType) {
    
        MuleReqOpts.path = muleCreateIssuePath;
        MuleReqOpts.method = createIssueMethod;
    
        var MuleReqBody = {
            &#39;fields&#39;: {
                &#39;project&#39;: {
                    &#39;key&#39;: projectKey
                },
                &#39;summary&#39;: &#39;Test Message&#39;,
                &#39;description&#39;: &#39;Issue created for alexa skill kit from Integration alexa to jira&#39;,
                &#39;issuetype&#39;: {
                    &#39;name&#39;: iType // Make sure your JIRA project configuration(s) supports this Issue Type.
                }
            }
        };
    
        return doApiCall(MuleHttp, MuleReqOpts, MuleReqBody, &#39;creating issue&#39;, 201);
    };
    
    function doApiCall(httplib, reqOpts, reqBody, happening, successCode) {
        return new Promise(((resolve, reject) =&gt; {
            var req = httplib.request(reqOpts, (res) =&gt; {
                res.setEncoding(&#39;utf8&#39;);
                let returnData = &#39;&#39;;
                res.on(&#39;data&#39;, (chunk) =&gt; {
                    returnData += chunk;
                });
                res.on(&#39;end&#39;, () =&gt; {
                    resolve(returnData);
                });
                res.on(&#39;error&#39;, (error) =&gt; {
                    reject(error);
                });
            });
            req.write(JSON.stringify(reqBody));
            req.end();
    
            req.on(&#39;error&#39;, function(err) {
                context.done(new Error(&#39; request error: &#39; + err.message));
            });
            req.setTimeout(reqTimeout, function() {
                context.done(new Error(&#39; request timeout after &#39; + reqTimeout + &#39; milliseconds.&#39;));
            });
        }));
    };
    
    const UpdateJIRAIssueHandler = {
        
        canHandle(handlerInput) {
                console.log(&#39;1&#39;);
    
            const request = handlerInput.requestEnvelope.request;
                        console.log(&#39;2&#39;);
    
            userName = request.intent.slots.USER.value;
    
            var keyValue = request.intent.slots.PROJECTKEY.value;
            console.log(&#39;keyValue : &#39; + keyValue);
    
            keyValueID = keyValue.toUpperCase();
            IssueNumber = request.intent.slots.ISSUENUMBER.value;
            let INumber = Number(IssueNumber);
                console.log(&#39;IssueNumber value: &#39;+INumber);
    
            console.log(&#39;key value id: &#39; + keyValueID);
            return request.type === &#39;IntentRequest&#39; &amp;&amp;
                request.intent.name === &#39;UpdateJIRAIssue&#39;;
        },
        async handle(handlerInput) {
            const updateIssue = await updateJiraIssue(userName);
            console.log(&#39;updateIssue log: &#39; + updateIssue);
    
            const speechOutput = JSON.parse(updateIssue).responseMessage;
            console.log(&#39;speechOutput log: &#39; + speechOutput);
            return handlerInput.responseBuilder
                .speak(speechOutput)
                .getResponse();
        },
    };
    
    
    function updateJiraIssue(userName) {
        console.log(&#39;inside method: &#39; +userName);
        MuleReqOpts.method = updateIssueMethod;
    
        var postdata = {
            &quot;fields&quot;: {
                &quot;assignee&quot;: {
                    &quot;name&quot;: userName
                }
            }
        }
        
        return doApiUpdateCall(MuleHttp, MuleReqOpts, postdata, &#39;updating issue&#39;, 201);
    };
    
    function doApiUpdateCall(httplib, options, postdata, happening, successCode) {
    
        options.path = muleUpdateIssuePath + keyValueID +&#39;-&#39;+IssueNumber ;
    
        return new Promise(((resolve, reject) =&gt; {
    
            var req = httplib.request(options, (res) =&gt; {
                console.log(options);
    
                res.setEncoding(&#39;utf8&#39;);
                let returnData = &#39;&#39;;
                res.on(&#39;data&#39;, (body) =&gt; {
                    returnData += body;
                    console.log(returnData);
    
                });
                res.on(&#39;end&#39;, () =&gt; {
                    resolve(returnData);
                });
                console.log(&#39;1&#39;);
                console.log(&#39;Body: &#39;);
            });
    
            req.on(&#39;error&#39;, function(e) {
                console.log(&#39;problem with request: &#39; + e.message);
            });
    
            var jirapostString = JSON.stringify(postdata);
            console.log(jirapostString);
            req.write(jirapostString);
            req.end();
        }));
    };
    
    const GetJIRAIssueHandler = {
        canHandle(handlerInput) {
            console.log(&#39;1&#39;);
            const request = handlerInput.requestEnvelope.request;
            var keyValue = request.intent.slots.Issue.value;
            console.log(&#39;keyValue: &#39; + keyValue);
    
            keyValueID = keyValue.toUpperCase();
            return request.type === &#39;IntentRequest&#39; &amp;&amp;
                request.intent.name === &#39;GetJIRAIssue&#39;;
        },
        async handle(handlerInput) {
            const getIssue = await GetJIRAIssue();
            console.log(&#39;getIssue log: &#39; + getIssue);
    
            const assigneeName = JSON.parse(getIssue).fields.assignee.name;
            const key = JSON.parse(getIssue).fields.assignee.key;
            const reporterName = JSON.parse(getIssue).fields.reporter.name;
            const issueType = JSON.parse(getIssue).fields.issuetype.name;
            const projectName = JSON.parse(getIssue).fields.project.name;
            const summaryDetails = JSON.parse(getIssue).fields.summary;
    
            const speechOutput = &#39;Here are the issue details summary: Assignee : &#39; + assigneeName.concat(&#39; ,reporter : &#39; + reporterName, &#39; ,Issue Key : &#39; + key, &#39; ,IssueType : &#39; + issueType, &#39; ,ProjectName : &#39; + projectName, &#39; ,Summary : &#39; + summaryDetails);
    
            console.log(&#39;speechOutput log: &#39; + speechOutput);
    
            return handlerInput.responseBuilder
                .speak(speechOutput)
                .getResponse();
        },
    };
    
    
    function GetJIRAIssue() {
        MuleReqOpts.method = getIssueMethod;
    
        return doApiGetIssueCall(MuleHttp, MuleReqOpts, &#39;get issue details&#39;, 201);
    
    };
    
    function doApiGetIssueCall(httplib, options, happening, successCode) {
    
        options.path = muleUpdateIssuePath + keyValueID;
    
        return new Promise(((resolve, reject) =&gt; {
    
            https.get(options, (res) =&gt; {
                console.log(options);
    
                res.setEncoding(&#39;utf8&#39;);
                let returnData = &#39;&#39;;
                res.on(&#39;data&#39;, (body) =&gt; {
                    returnData += body;
                    console.log(&#39;response :&#39;, returnData);
    
                });
                res.on(&#39;end&#39;, () =&gt; {
                    resolve(returnData);
                });
            });
    
        }));
    };
    
    const GetJIRAIssueCountHandler = {
        canHandle(handlerInput) {
            const request = handlerInput.requestEnvelope.request;
            userName = request.intent.slots.USER.value;
            console.log(&#39;userName Value: &#39; + userName);
            const issueType = request.intent.slots.ISSUETYPE.value;
            iType = capitalize_Words(issueType);
            return request.type === &#39;IntentRequest&#39; &amp;&amp;
                request.intent.name === &#39;GetJIRAIssueCount&#39;;
        },
        async handle(handlerInput) {
            const getIssueCount = await GetJIRAIssueCount();
            console.log(&#39;getIssue log: &#39; + getIssueCount);
            const total = JSON.parse(getIssueCount).total;
    
            const speechOutput = (&#39;Here is the &#39;+iType+&#39; count details: &#39; +total );
    
            console.log(&#39;speechOutput log: &#39; + speechOutput);
    
            return handlerInput.responseBuilder
                .speak(speechOutput)
                .getResponse();
        },
    };
    
    function GetJIRAIssueCount() {
        MuleReqOpts.method = getIssueMethod;
    
        return doApiGetIssueCountCall(MuleHttp, MuleReqOpts, &#39;get issue count details&#39;, 201);
    
    };
    
    function doApiGetIssueCountCall(httplib, options, happening, successCode) {
    
        options.path = muleUpdateIssuePath + userName +&#39;/&#39;+iType;
    
        return new Promise(((resolve, reject) =&gt; {
    
            https.get(options, (res) =&gt; {
                console.log(options);
    
                res.setEncoding(&#39;utf8&#39;);
                let returnData = &#39;&#39;;
                res.on(&#39;data&#39;, (body) =&gt; {
                    returnData += body;
                    console.log(&#39;response :&#39;, returnData);
    
                });
                res.on(&#39;end&#39;, () =&gt; {
                    resolve(returnData);
                });
            });
    
        }));
    };
    
    const HelpHandler = {
      canHandle(handlerInput) {
        const request = handlerInput.requestEnvelope.request;
        return request.type === &#39;IntentRequest&#39;
          &amp;&amp; request.intent.name === &#39;AMAZON.HelpIntent&#39;;
      },
      handle(handlerInput) {
        return handlerInput.responseBuilder
          .speak(HELP_MESSAGE)
          .reprompt(HELP_REPROMPT)
          .getResponse();
      },
    };
    
    const ExitHandler = {
      canHandle(handlerInput) {
        const request = handlerInput.requestEnvelope.request;
        return request.type === &#39;IntentRequest&#39;
          &amp;&amp; (request.intent.name === &#39;AMAZON.CancelIntent&#39;
            || request.intent.name === &#39;AMAZON.StopIntent&#39;);
      },
      handle(handlerInput) {
        return handlerInput.responseBuilder
          .speak(STOP_MESSAGE)
          .getResponse();
      },
    };
    
    const SessionEndedRequestHandler = {
      canHandle(handlerInput) {
        const request = handlerInput.requestEnvelope.request;
        return request.type === &#39;SessionEndedRequest&#39;;
      },
      handle(handlerInput) {
        console.log(`Session ended with reason: ${handlerInput.requestEnvelope.request.reason}`);
    
        return handlerInput.responseBuilder.getResponse();
      },
    };
    
    const ErrorHandler = {
      canHandle() {
        return true;
      },
      handle(handlerInput, error) {
        console.log(`Error handled: ${error.message}`);
    
        return handlerInput.responseBuilder
          .speak(&#39;Sorry, an error occurred.&#39;)
          .reprompt(&#39;Sorry, an error occurred.&#39;)
          .getResponse();
      },
    };
    
    const SKILL_NAME = &#39;Space Facts&#39;;
    const GET_FACT_MESSAGE = &#39;Here\&#39;s your fact: &#39;;
    const HELP_MESSAGE = &#39;You can say tell me a space fact, or, you can say exit... What can I help you with?&#39;;
    const HELP_REPROMPT = &#39;What can I help you with?&#39;;
    const STOP_MESSAGE = &#39;Goodbye!&#39;;
    
    const data = [
      &#39;A year on Mercury is just 88 days long.&#39;,
      &#39;Despite being farther from the Sun, Venus experiences higher temperatures than Mercury.&#39;,
      &#39;Venus rotates counter-clockwise, possibly because of a collision in the past with an asteroid.&#39;,
      &#39;On Mars, the Sun appears about half the size as it does on Earth.&#39;,
      &#39;Earth is the only planet not named after a god.&#39;,
      &#39;Jupiter has the shortest day of all the planets.&#39;,
      &#39;The Milky Way galaxy will collide with the Andromeda Galaxy in about 5 billion years.&#39;,
      &#39;The Sun contains 99.86% of the mass in the Solar System.&#39;,
      &#39;The Sun is an almost perfect sphere.&#39;,
      &#39;A total solar eclipse can happen once every 1 to 2 years. This makes them a rare event.&#39;,
      &#39;Saturn radiates two and a half times more energy into space than it receives from the sun.&#39;,
      &#39;The temperature inside the Sun can reach 15 million degrees Celsius.&#39;,
      &#39;The Moon is moving approximately 3.8 cm away from our planet every year.&#39;,
    ];
    
    const skillBuilder = Alexa.SkillBuilders.custom();
    
    exports.handler = skillBuilder
      .addRequestHandlers(
        GetNewFactHandler,
        CreateJIRAIssueHandler,
        UpdateJIRAIssueHandler,
        GetJIRAIssueHandler,
        GetJIRAIssueCountHandler,
        HelpHandler,
        ExitHandler,
        SessionEndedRequestHandler
      )
      .addErrorHandlers(ErrorHandler)
      .lambda();



</details>


# 答案1
**得分**: 1

检查你的代码中是否存在查找 `someObject.someNestedProperty.value` 的情况

我怀疑你在意图中定义的插槽值与你的 `model/some-LANG.json` 文件中的定义不同尝试在没有 `someNestedProperty` 的情况下访问 `someObject` 中的 `value` 属性将导致错误例如 `request.intent.slots.PROJECTKEY.value`)。

如果这是一个 Alexa 托管的技能CloudWatch 日志记录已经内置打开 **Alexa Developer Console**编辑你的技能然后转到 **Code** 选项卡在左下角你应该看到一个名为 **Logs: Amazon CloudWatch** 的链接你可以使用简单的 `console.log()` 语句记录任何你想要的内容

此外请注意 `ask-sdk-core` npm 包包含用于获取 slotValues以及其他伟大工具的辅助方法有关更多信息请参阅此链接https://developer.amazon.com/en-US/docs/alexa/alexa-skills-kit-sdk-for-nodejs/utilities.html

<details>
<summary>英文:</summary>

Check all of your code for instances where you are looking for `someObject.someNestedProperty.value`.  

I suspect that your slot values in your Intents are not the same as defined in your `model/some-LANG.json` file. Trying to access `value` property from `someObject` without a `someNestedProperty` will cause your error (i.e. `request.intent.slots.PROJECTKEY.value`).

If this is a Alexa-hosted skill, CloudWatch logging is built right in.  Open the **Alexa Developer Console**, edit your skill, then go to the **Code** tab.  On the bottom left, you should see a link for **Logs: Amazon CloudWatch**.  You can log anything you want with a simple `console.log()` statement.

Also, be aware that the `ask-sdk-core` npm package contains helper methods to get slotValues (among other great tools).  For more information, see this link: https://developer.amazon.com/en-US/docs/alexa/alexa-skills-kit-sdk-for-nodejs/utilities.html

</details>



# 答案2
**得分**: 0

谢谢大家的建议和及时回应现在问题已解决解决方法是addRequestHandlers方法将按顺序执行方法即使您执行/触发第三个处理程序它也将执行第一个和第二个然后转到第三个这里的问题是当您从Alexa触发第三个处理程序命令时它将传递与第三个处理程序话语相关的插槽值因此具有插槽值的第一个和第二个处理程序无法解析并失败因此我在那里加入了一个条件以跳过第一个和第二个处理程序的执行这样就解决了问题

<details>
<summary>英文:</summary>

Thanks all for your suggestions and prompt response.
Now the issue is resolved and the solution is the addRequestHandlers method will execute methods sequentially even if you execute/trigger third handler it will execute 1st and 2nd and goes to 3rd one. Here the issue is when you trigger a 3rd handler command from alexa it will passs the slot values related to the 3rd handler utterance and hence the 1st and 2nd haldler having slot values are not able to resolve and failed. so i put a condition overthere to skip 1st and 2nd handler execution and it worked.

</details>



huangapple
  • 本文由 发表于 2020年1月7日 00:31:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/59615670.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定