jesse21
jesse21
  • 发布:2024-04-23 12:57
  • 更新:2024-04-23 14:08
  • 阅读:58

最新版本HbuilderX-Alpha和最新版本微信开发者工具,云函数调用 await uniCloud.httpclient.request报错

分类:HBuilderX

云函数里,本地调试。这样调用报错,

const res2112 = await uniCloud.httpclient.request(paraUrl, {
method: 'POST',

12:53:18.635 [本地调试]Error: read ECONNRESET
12:53:18.635 [本地调试] at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)

Error: read ECONNRESET, POST https://api.sunoaiapi.com/api/v1/gateway/generate/gpt_desc -1 (connected: true, keepalive socket: false, socketHandledRequests: 1, socketHandledResponses: 0)
headers: {}
at _construct (construct.js?b17c:4)
at new Wrapper (wrapNativeSuper.js?a128:17)
at te._createSuperInternal (index.js?a9ff:1)
at new te (index.js?a9ff:1)
at success (index.js?a9ff:1)
at Object.<anonymous> (WASubContext.js?t=wechat&s=1713847970445&v=3.4.0:1)
at Object.<anonymous> (WASubContext.js?t=wechat&s=1713847970445&v=3.4.0:1)
at WAServiceMainContext.js?t=wechat&s=1713847970445&v=3.4.0:1
at Module.Dn (WASubContext.js?t=wechat&s=1713847970445&v=3.4.0:1)
at Object.success (WAServiceMainContext.js?t=wechat&s=1713847970445&v=3.4.0:1)

之前都没问题,代码没动,今天才出现这个问题

2024-04-23 12:57 负责人:无 分享
已邀请:
DCloud_uniCloud_WYQ

DCloud_uniCloud_WYQ

看错误信息是请求三方服务报错,可以试一下用postman之类的工具能不能请求通

要回复问题请先登录注册