klover2 / wechatpay-node-v3-ts

微信支付v3
MIT License
528 stars 82 forks source link

`transactions_native` 报错信息处理异常 Cannot read properties of undefined (reading 'text') #45

Closed waveiron closed 1 year ago

waveiron commented 1 year ago
TypeError: Cannot read properties of undefined (reading 'text')
    at Pay.<anonymous> (/root/node_modules/wechatpay-node-v3/dist/lib/base.js:105:94)
    at step (/root/node_modules/wechatpay-node-v3/dist/lib/base.js:44:23)
    at Object.throw (/root/node_modules/wechatpay-node-v3/dist/lib/base.js:25:53)
    at rejected (/root/node_modules/wechatpay-node-v3/dist/lib/base.js:17:65)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

有可能是 err.response 空值的问题:

image
klover2 commented 1 year ago

正常来说 应该是你参数错了 才会触发这种异常报错

WanGe2000 commented 1 year ago

正常来说 应该是你参数错了 才会触发这种异常报错

具体是什么参数呢?我也碰到了这个问题,该传的参数都传了

klover2 commented 1 year ago

正常来说 应该是你参数错了 才会触发这种异常报错

具体是什么参数呢?我也碰到了这个问题,该传的参数都传了

请看最新版本 2.1.4 兼容了空值问题

WanGe2000 commented 1 year ago

正常来说 应该是你参数错了 才会触发这种异常报错

具体是什么参数呢?我也碰到了这个问题,该传的参数都传了

请看最新版本 2.1.4 兼容了空值问题

好的,感谢