l***@163.com
l***@163.com
  • 发布:2022-11-18 01:05
  • 更新:2022-11-19 00:18
  • 阅读:382

uniCloud.httpclient.request 没返回值 太久报错了

分类:uniCloud

(node:4) UnhandledPromiseRejectionWarning: ConnectionTimeoutError: Connect timeout for 5000ms, POST http://api.turingos.cn/turingos/api/v2 -2 (connected: false, keepalive socket: false, agent status: {"createSocketCount":1,"createSocketErrorCount":0,"closeSocketCount":1,"errorSocketCount":0,"timeoutSocketCount":0,"requestCount":0,"freeSockets":{},"sockets":{},"requests":{}}, socketHandledRequests: 1, socketHandledResponses: 0)
headers: {}
at (/code/index.js:44:11995)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at listOnTimeout (timers.js:290:5)
[weixin-mp/ac14018c1668704557192159589/78874ms/ERROR] (node:4) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
[weixin-mp/ac14018c1668704557192159589/78874ms/ERROR] (node:4) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

2022-11-18 01:05 负责人:无 分享
已邀请:
DCloud_uniCloud_CRL

DCloud_uniCloud_CRL

测试以下这个url能否连通,如果接口耗时太长,调大timeout值试试。

l***@163.com

l***@163.com (作者)

解决了 之前没有加await 提前结束下一步执行

该问题目前已经被锁定, 无法添加新回复