云函数里,本地调试。这样调用报错,
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)
之前都没问题,代码没动,今天才出现这个问题
1 个回复
DCloud_uniCloud_WYQ
看错误信息是请求三方服务报错,可以试一下用postman之类的工具能不能请求通