Skip to content

Crash for unreachable target

Summary

Testing an unreachable target will crash the app.

Steps to reproduce

Test against a domain with a ip address with is not reachable.

Example Project

--

What is the current bug behavior?

compilenix.org:443
[Thu, 04 Jul 2019 06:59:00 GMT]
{
    "errno": "EHOSTUNREACH",
    "code": "EHOSTUNREACH",
    "syscall": "connect",
    "address": "90.187.21.25",
    "port": 443
}
events.js:165
      throw er; // Unhandled 'error' event
      ^

Error: connect EHOSTUNREACH 90.187.21.25:443
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1174:14)
Emitted 'error' event at:
    at TLSSocket.socketErrorListener (_http_client.js:395:9)
    at TLSSocket.emit (events.js:180:13)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at process._tickCallback (internal/process/next_tick.js:178:19)

What is the expected behavior?

  • throw an error

Relevant logs and/or screenshots

--

Possible fixes

--

/cc @CompileNix