Make request to the server
The server aborted the pending request
got returned error
error have code "undefined"
ReadError: The server aborted the pending request
at IncomingMessage.<anonymous> (T:\test\node_modules\got\dist\source\core\index.js:675:31)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:315:20)
at IncomingMessage.origin.emit (T:\test\node_modules\@szmarczak\http-timer\dist\source\index.js:39:20)
at TLSSocket.socketCloseListener (_http_client.js:383:11)
at TLSSocket.emit (events.js:327:22)
at net.js:674:12
at TCP.done (_tls_wrap.js:566:7) {
code: undefined,
timings: {
start: 1591341068984,
socket: 1591341068984,
lookup: 1591341068986,
connect: 1591341069136,
secureConnect: 1591341069308,
upload: 1591341069308,
response: 1591341069831,
end: 1591341082428,
error: undefined,
abort: undefined,
phases: {
wait: 0,
dns: 2,
tcp: 150,
tls: 172,
request: 0,
firstByte: 523,
download: 12597,
total: 13444
}
},
bufferedData: <Buffer 8d 0a 64 42 d2 1b 4c 28 8f 1d 14 24 40 52 56 e2 09 ef fa 4c f2 90 e0 cd e8 dd ef 2e e1 d1 4a bf a7 12 6d 92 9c 94 61 7e 5b f8 06 2b 15 3f dd 38 eb b7 ... 1251646 more bytes>
}
Make request to the server
The server aborted the pending request
got will retry request if retry option set
got returned response or error
const got = require('got');
(async () => {
try{
let r = await got('http://httpbin.org/anything?test=1', { retry: 5 });
console.log(r);
}
catch(e){
console.log(e);
}
})();
up, same issue
(node:28276) UnhandledPromiseRejectionWarning: ReadError: The server aborted the pending request at IncomingMessage.
(/storage/emulated/0/Download/Project/spotify/node_modules/got/dist/source/core/index.js:684:31)
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:315:20)
at IncomingMessage.origin.emit (/storage/emulated/0/Download/Project/spotify/node_modules/@szmarczak/http-timer/dist/source/index.js:39:20) at TLSSocket.socketCloseListener (_http_client.js:420:11) at TLSSocket.emit (events.js:327:22) at net.js:671:12 at TCP.done (_tls_wrap.js:561:7) (Usenode --trace-warnings ...to show where the warning was created)
started getting this error aswell
(node:14676) UnhandledPromiseRejectionWarning: ReadError: The server aborted the pending request
at IncomingMessage.
at Object.onceWrapper (events.js:421:28)
at IncomingMessage.emit (events.js:315:20)
at IncomingMessage.origin.emit (\node_modules\@szmarczak\http-timer\dist\source\index.js:39:20)
at TLSSocket.socketCloseListener (_http_client.js:422:11)
at TLSSocket.emit (events.js:327:22)
at net.js:670:12
at TCP.done (_tls_wrap.js:562:7)
(Use node --trace-warnings ... to show where the warning was created)
The fix is just to add a code property here:
This used to be ECONNRESET
Same issue here. I got:
UnhandledPromiseRejectionWarning: ReadError: The server aborted the pending request
What really bothers me (most) is that I can't catch it with a try...catch....
@dannycreations @zedd3v @SukkaW Fixed. See #1308
@szmarczak Thanks!
Most helpful comment
Same issue here. I got:
What really bothers me (most) is that I can't
catchit with atry...catch....