lmammino / tall

Promise-based, No-dependency URL unshortner (expander) module for Node.js
https://lmammino.github.io/tall/
MIT License
72 stars 7 forks source link

Not throwing exception on "Error: getaddrinfo ENOTFOUND" #11

Closed alexdpoon closed 5 years ago

alexdpoon commented 5 years ago

When using tall() inside a try/catch block, the following kind of error isn't thrown and catchable, but instead, the node process exits with:

Error: getaddrinfo ENOTFOUND XXXXXX XXXXXX at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26)

alexdpoon commented 5 years ago

Also, if this helps, the original URL was a bit.ly that redirects to an amazon ec2 aws url with port 8080, as in:

http://ec2-xx-xxx-xxx-xx.us-east-2.compute.amazonaws.com:8080/login

The 8080 is probably not being handled by tall correctly.

lmammino commented 5 years ago

Hello @alexdpoon, thanks for opening this issue. I just opened a PR that should address this issue, can you please review/validate it?

alexdpoon commented 5 years ago

Thanks, looks good.

lmammino commented 5 years ago

Version 2.2 was just published with this fix.

Thanks again @alexdpoon