-
Notifications
You must be signed in to change notification settings - Fork 451
Unhandled error event #356
Comments
I do not think it is an good idea, but you could use empty handler for ignore errors as workaround: var client = ldap.createClient(opts);
client.on('error', function(){}); Or handle any other errors here and ignore only ENOTFOUND. |
This bug still persists in 2018 (version 1.0.2) What happened with #433 bugfix ? |
I think this problem should be considered as a documentation bug, since the outlined examples on http://ldapjs.org/client.html do not explain how to securely setup a ldap connection...
HTH and Cheers, Kai |
I think @KaiWilke is right, this looks like a documentation issue. The library has pretty poor documentation and I believe a lot of this is from the author expecting users to already have a good understanding / experience working with LDAP. Unfortunately looks at the lack of attention from the maintainer and open PRs I don't see it worth updating the docs, because they will likely never get merged. |
It sounds like you are missing a |
👋 On February 22, 2023, we released version 3 of this library. As a result, we are closing this issue/pull request. Please see issue #839 for more information, including how to proceed if you feel this closure is in error. |
This is the error I'm seeing when trying to look up a user:
2016-03-11T15:08:57.94+0100 [App/0] ERR events.js:141
2016-03-11T15:08:57.94+0100 [App/0] ERR throw er; // Unhandled 'error' event
2016-03-11T15:08:57.94+0100 [App/0] ERR ^
2016-03-11T15:08:57.94+0100 [App/0] ERR Error: getaddrinfo ENOTFOUND company.com:636
2016-03-11T15:08:57.94+0100 [App/0] ERR at errnoException (dns.js:26:10)
2016-03-11T15:08:57.94+0100 [App/0] ERR at GetAddrInfoReqWrap.onlookup as
oncomplete
using node v4.4.0, ldapjs 1.0.0.
I suspect that the ldap server is not accessible, but this shouldn't result in an unhandled error event, should it?
Thanks
The text was updated successfully, but these errors were encountered: