Skip to content

Error: getaddrinfo ENOENT api.ipstack.com #2

Description

@obsius

If the domain doesn't resolve, the error is not caught.

Fix explained here:

https://stackoverflow.com/questions/21662619/how-to-catch-getaddrinfo-enotfound

var getRequest = _http.get(options, function(res) {
// …
});
getRequest.on('error', function (err) {
console.log(err);
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions