Looking for list of causes that result in "tunneling socket could not be established" on Node to do some methodic exception handling

Writing some http-code using proxies.

Under load sometimes I'm getting:

  • tunneling socket could not be established, cause=connect ECONNREFUSED
  • tunneling socket could not be established, cause=connect ENETUNREACH

Where can I get a list of all error-codes that could be thrown as part of this? I don't want to fix the above two and get hit by a third, eleventh, etc. cause later down the road.

Those are standard linux error codes. Those two are related to network. See the full list here. It comes handy to decipher the errors.