Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Error: ECONNRESET, Connection reset by peer #124

cmadsen opened this Issue · 2 comments

3 participants


How do I handle

Error: ECONNRESET, Connection reset by peer
at Socket._writeImpl (net.js:159:14)
at Socket._writeOut (net.js:444:25)
at Socket.flush (net.js:523:24)
at Socket._onWritable (net.js:603:12)
at IOWatcher.onWritable as callback

when doing a request({uri:'...'},function(error, response, body){})

I expected the callback to activated with something in the error param


CMIIW, I think Request traps ECONNRESET then retries.

Maybe that's why you're not seeing the error, because in that case Request won't emit an error.


actually, that retry only happens with the "forever" agent.

this is actually a different issue, we emit "error" but the callback error handler doesn't handle request emitted errors. there is another ticket on this, closing this one.

@mikeal mikeal closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.