mcavage/node-ldapjs — Issue #25: How can I determine whether the entry is found?
Author: BYVoid
Created: 2011-10-13 14:48:17+00:00
State: open

I was developing a project that use ldapjs as a ldap client. But now I found that I can not receive a message when the entry was not found by using client.search. For example, when I search '(uid=nuk)' which exists in the ldap server, the callback function of res.on('searchEntry',callback); would be called, and the results of

res.on('end',function(result){
console.log('status: '+result.status);
});

is "status: 0".

But when I search '(uid=nuk1)', which does not exist, result.status is also 0. Even the whole object of 'result' is the same as the one when the entry is found.

Now I have not an approach to get a message when the entry is not found.
The version I was using is 0.2.0