You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/node_modules/request/request.js:1264
self.response.abort()
^
TypeError: Object #<IncomingMessage> has no method 'abort'
at Request.abort (/node_modules/request/request.js:1264:19)
at Request.<anonymous> (/protocol-issue.js:12:17)
at Request.emit (events.js:95:17)
at Request.init (/node_modules/request/request.js:591:17)
at Request.onRequestResponse (/node_modules/request/request.js:1127:10)
at ClientRequest.emit (events.js:95:17)
at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1688:21)
at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)
at Socket.socketOnData [as ondata] (http.js:1583:20)
at TCP.onread (net.js:527:27)
due to the IncomingMessage object not having a abort() method.
I'm calling the abort() method here just to make sure that everything is cleaned-up after the request errored-out (no memory leaks).
The text was updated successfully, but these errors were encountered:
I ran into this exception too, not even calling abort() on Request.
TypeError: self.response.abort is not a function
at Request.abort (/app/node_modules/request/request.js:1047:19)
at Request.init (/app/node_modules/request/request.js:285:10)
at Redirect.onResponse (/app/node_modules/request/lib/redirect.js:148:11)
at Request.onRequestResponse (/app/node_modules/request/request.js:897:22)
at emitOne (events.js:77:13)
at ClientRequest.emit (events.js:169:7)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.
at HTTPParser.parserOnHeadersComplete (_http_common.js:88:23)
at Socket.socketOnData (_http_client.js:311:20)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
Why would abort() be called on an IncomingMessage btw?
Was it meant to be destroy()?
If you are redirected to a site with an invalid protocol, request will handle this fine and emits an
error
event with the message:Now if you want to handle that error and abort the request like this:
you will get the following exception:
due to the
IncomingMessage
object not having aabort()
method.I'm calling the
abort()
method here just to make sure that everything is cleaned-up after the request errored-out (no memory leaks).The text was updated successfully, but these errors were encountered: