Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real error code is overwritten with ECONNRESET #19

Open
rhalff opened this issue Jun 17, 2016 · 0 comments
Open

Real error code is overwritten with ECONNRESET #19

rhalff opened this issue Jun 17, 2016 · 0 comments

Comments

@rhalff
Copy link

rhalff commented Jun 17, 2016

I notice the real error code is overwritten with ECONNRESET.

https://github.com/request/tunnel-agent/blob/master/index.js#L177

The real error code is contained in cause.code and not passed along.

In my case the error code is ECONNREFUSED

{ Error: tunneling socket could not be established, cause=connect ECONNREFUSED 127.0.0.1:42963
    at ClientRequest.onError (node_modules/tunnel-agent/index.js:177:17)
    at ClientRequest.g (events.js:286:16)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketErrorListener (_http_client.js:306:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at emitErrorNT (net.js:1272:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9) code: 'ECONNRESET' }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant