【问题标题】:Alexa Smart Home Error Response in the documentation is not clear enough文档中的 Alexa Smart Home 错误响应不够清晰
【发布时间】:2018-11-15 08:21:33
【问题描述】:

我指的是Amazon Alexa Smart Home 的文档,我对他们给出的 JSON 正文有疑问。

{"event": {
"header": {
  "namespace": "Alexa",
  "name": "ErrorResponse",
  "messageId": "abc-123-def-456",
  "correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8ptlAKulUj90jSqg==",
  "payloadVersion": "3"
},
"endpoint":{
    "endpointId":"appliance-001"
},
"payload": {
  "type": "ENDPOINT_UNREACHABLE",
  "message": "Unable to reach endpoint 12345 because it appears to be offline"
}}}

这是来自 Alexa 的指令还是我需要在响应中发送的事件。

谢谢

【问题讨论】:

    标签: alexa alexa-skills-kit alexa-skill smarthomeskill


    【解决方案1】:

    这是ErrorResponse 事件,当处理控制或查询指令时发生错误时,您必须发送给 Alexa。

    ErrorResponse 事件的负载必须指定 typemessage

    1. type:这表示已发生的错误类型。 Alexa 使用此属性来适当地响应客户。
    2. message:提供有关错误的更多信息以用于记录目的的字符串。

    ENDPOINT_UNREACHABLE 错误类型表示目标端点当前无法访问或离线。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-10-25
      • 2019-12-10
      • 1970-01-01
      • 1970-01-01
      • 2016-10-04
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多