Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

client.search responds with "ConnectionError" with a string "attributes" search option #49

Closed
trentm opened this issue Jan 12, 2012 · 1 comment

Comments

@trentm
Copy link
Contributor

trentm commented Jan 12, 2012

Doing an ldapjs client search using the "attributes" search option erroneously set to a string (instead of an array) errors out with "ConnectionError"... i.e. the connection to the ufds server is lost. Would be nicer if that either threw immediately on the client.search with invalid input... or returned a more reasonable error and not bounce the connection.

 ...
 base = 'ou=users, o=smartdc'
 uuid = '11111111-1111-1111-1111-111111111111'
 searchOpts = {
   filter: '(&(uuid=' + uuid + ')(objectclass=sdcperson))',
   scope: "one",
   attributes: "dn"
 };
 client.search(base, searchOpts, function(err, result) {
   if (err) {
     console.log("search start error")
     return callback(err);
   }
...
@mcavage
Copy link
Contributor

mcavage commented Jan 19, 2012

Will be in npm@0.4.6

@mcavage mcavage closed this as completed Jan 19, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants