Bot框架直线502错误

Bot framework Direct Line 502 error

我一直在尝试在 html 上使用此代码通过 DirectLine 连接到我的机器人。

<!DOCTYPE html>
<html>
  <head>
    <link href="https://cdn.botframework.com/botframework-webchat/latest/botchat.css" rel="stylesheet" />
  </head>
  <body>
    <div id="bot"/>
    <script src="https://cdn.botframework.com/botframework-webchat/latest/botchat.js"></script>
    <script>
      BotChat.App({
        directLine: { secret: 'xxxxx' },
        user: { id: 'userid' },
        bot: { id: 'botid' },
        resize: 'detect'
      }, document.getElementById("bot"));
    </script>
  </body>
</html>

直线密保我已经查过了,没问题。当我测试这段代码时,聊天出现了,我收到了你好!我在机器人上设置的消息,但是当我尝试向机器人发送消息时,我在 Web 浏览器的控制台上收到此错误

如何正确使用 DirectLine 或我在发送消息的代码中缺少什么?

我检查了 Azure status history 并发现 6/14 出现了机器人服务问题,这可能导致与机器人的通信无法按预期工作。