“Sorry, I had trouble doing what you asked. Please try again.”

This message comes from the default error handler placed in the skill’s fulfillment code (in index.js) when the project was initialized with ask new. If you see or hear this response, it means that Alexa found a matching intent for your utterance and it attempted to handle the request, but there was some exception thrown from the intent handler.

The exception thrown could be almost anything, depending on what your skill was doing when the exception was thrown. The best way to determine what the problem is (and then fix it) is to add a few logging messages in the intent handler and view the logs in CloudWatch.

It might be helpful to know that you are welcome to change the message in the default error handler to say anything you want it to say. This could be useful in making your skill unique among other skills, even in how it handles errors.

Thank you!

We hope you enjoyed this book and that you’re already thinking about what you want to learn next. To help make that decision easier, we’re offering you this gift.

Head on over to https://pragprog.com right now, and use the coupon code BUYANOTHER2022 to save 30% on your next ebook. Offer is void where prohibited or restricted. This offer does not apply to any edition of the The Pragmatic Programmer ebook.

And if you’d like to share your own expertise with the world, why not propose a writing idea to us? After all, many of our best authors started off as our readers, just like you. With a 50% royalty, world-class editorial services, and a name you trust, there’s nothing to lose. Visit https://pragprog.com/become-an-author/ today to learn more and to get started.

We thank you for your continued support, and we hope to hear from you again soon!

The Pragmatic Bookshelf

images/Coupon.png
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset