如何解决axios 调用收到的超时时间不明确
在执行使用 axios 调用的 easy-soap-request 的soapRequest 调用时,我们得到了 ECONNABORTED 错误代码的超时。
ECONNABORTED 超时似乎是对其他场景的有效响应,而不是经典超时。你可以看看here、here和here。
这是我们的电话:
const { response } = await soapRequest({ url,headers,xml: textXML,timeout: 100000 });
这是个例外:
message timeout of 100000ms exceeded
name Error
stack Error: timeout of 100000ms exceeded
at createError (/app/node_modules/easy-soap-request/node_modules/axios/lib/core/createError.js:16:15)
at RedirectableRequest.handleRequestTimeout (/app/node_modules/easy-soap-request/node_modules/axios/lib/adapters/http.js:264:16)
at Object.onceWrapper (events.js:421:28)
at RedirectableRequest.emit (events.js:315:20)
at RedirectableRequest.EventEmitter.emit (domain.js:467:12)
at Timeout._onTimeout (/app/node_modules/follow-redirects/index.js:166:13)
at listOnTimeout (internal/timers.js:554:17)
at processTimers (internal/timers.js:497:7
code ECONNABORTED
我们从 nodejs heroku 服务器运行它。
主要问题是错误的根本原因是什么?
编辑:经过密集检查,发现这是一个真正的经典超时。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。