上QQ阅读APP看书,第一时间看更新
Handling errors
Throughout a user's conversation with a chatbot, there are a lot of points where errors can occur. Errors can occur when an utterance isn't understood, an API returns an error or when there is a mistake in the developer's code. Each of these needs to be caught and dealt with properly. We'll cover how to use try/catch and the to() method to catch these errors in Chapter 4, Connecting Your Alexa Skill to External APIs.