简体   繁体   English

Google上的操作-处理超时

[英]Actions on Google - Handle Timeout

If the Action on Google times out, for whatever reason, there doesn't seem to be a notification/request message sent notifying the webhook of this. 如果Google上的操作超时,无论出于何种原因,似乎都没有发送通知/请求消息来通知Webhook。

On Alexa platform, a SessionEnded message is sent to the webhook. 在Alexa平台上,将SessionEnded消息发送到Webhook。

How can I know if the assistant has timed out? 我怎么知道助手是否超时?

If you are using node.js in your webhook, you can use the app.catch-method. 如果您在Webhook中使用node.js,则可以使用app.catch-method。 It is used to catch all unhandled errors and then it is possible to send an appropriate message. 它用于捕获所有未处理的错误,然后可以发送适当的消息。 Here is an example: 这是一个例子:

app.catch((conv,error) => {
console.error(error);
conv.close("Oops, something went wrong. Our developers are trying to solve this as quickly as possible.");
})

Let me know if it worked. 让我知道它是否有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM