alexa / alexa-skills-kit-sdk-for-nodejs

The Alexa Skills Kit SDK for Node.js helps you get a skill up and running quickly, letting you focus on skill logic instead of boilerplate code.
Apache License 2.0
3.12k stars 736 forks source link

Doc Issue-Developing Your First Skill-No ErrorHandler defined in sample code #403

Closed gunnjr closed 6 years ago

gunnjr commented 6 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Performance issue
[ ] Feature request
[x] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior

I expect to be able to follow the directions and sample code provided on page "Developing Your First Skill" (https://github.com/alexa/alexa-skills-kit-sdk-for-nodejs/wiki/Developing-Your-First-Skill) to create an Alexa skill that deploys and runs without error.

Current Behavior

Following the directions and using the sample code for all handlers and the first code option under "Creating the Lambda Handler" results in post-deployment run-time error during skill invocation. The lambda code does not return a response to Alexa because the 'ErrorHandler', which is needed by the sample code (line: ".addErrorHandlers(ErrorHandler)), is not defined nor called for in the sample code or instructions.

FROM CLOUDWATCH..... 2018-05-31T13:28:18.370Z 7a9627c2-64d6-11e8-a585-1d031e261323 { "errorMessage": "ErrorHandler is not defined", "errorType": "ReferenceError", "stackTrace": [ "exports.handler (/var/task/index.js:96:25)" ] }

Possible Solution

// Not required, but suggest a fix/reason for the bug,
// or ideas how to implement the addition or change

Add instructions and sample code to define "ErrorHandler.'"

Steps to Reproduce (for bugs)

// Provide a self-contained, concise snippet of code
// For more complex issues provide a repo with the smallest sample that reproduces the bug
// Including business logic or unrelated code makes diagnosis more difficult

As stated, simple follow the instructions, beginning to end, for "Developing Your First Skill", making sure to use the first code option for "Creating Lambda Handler"

Context

I have used ASK V1 previously and was attempting to build my first ASK V2 skill.

Your Environment

Node.js and NPM Info

tianrenz commented 6 years ago

Hi @gunnjr ,

Thanks for your support. The wiki page has been updated to include the error handler code snippet.

Closing this issue now.

Regards