【问题标题】:Failed and error messages changed "2 UNKNOWN:" grpc-node失败和错误消息更改“2 UNKNOWN:”grpc-node
【发布时间】:2018-01-19 13:42:14
【问题描述】:
 Expected value to equal:
   "Zone doesn't exist"
 Received:
   "2 UNKNOWN: Zone doesn't exist"

我的测试突然失败了。在所有内容之前附加2 UNKNOWN:

【问题讨论】:

    标签: node.js grpc


    【解决方案1】:

    使用 ^1.7.2 时的向后兼容性问题,已更新至 1.8.4。

    grpc-node 1.8.4 添加错误代码名称到状态错误消息https://github.com/grpc/grpc-node/pull/126

    这会导致以下错误。

    替换

      try {
        await sayHello()
      } catch (error) {
        message = error.message
      }
    

      try {
        await sayHello()
      } catch (error) {
        message = error.details
      }
    

    messagedetails

    【讨论】:

      猜你喜欢
      • 2018-11-23
      • 2021-05-28
      • 1970-01-01
      • 2020-04-10
      • 1970-01-01
      • 1970-01-01
      • 2014-04-30
      • 1970-01-01
      • 2020-07-10
      相关资源
      最近更新 更多