remove the extra error handler

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2021-05-20 11:40:36 +02:00
parent 50a5348b79
commit 61a9c71bdc
@@ -75,10 +75,6 @@ export class LdapClient {
return await new Promise<SearchEntry[]>((resolve, reject) => {
const output: SearchEntry[] = [];
this.client.on('error', (err: ldap.Error) => {
reject(new Error(errorString(err)));
});
this.client.search(dn, options, (err, res) => {
if (err) {
reject(new Error(errorString(err)));