1
0
mirror of https://github.com/bitwarden/directory-connector synced 2026-02-24 16:43:06 +00:00

Refactor error handling in LdapDirectoryService to ensure proper unbinding and error propagation (#995)

This commit is contained in:
Jared
2026-02-23 12:42:39 -05:00
committed by GitHub
parent 9a2168c1d7
commit db3e7aa685

View File

@@ -68,10 +68,12 @@ export class LdapDirectoryService implements IDirectoryService {
}
groups = await this.getGroups(groupForce);
}
} finally {
} catch (e) {
await this.client.unbind();
throw e;
}
await this.client.unbind();
return [groups, users];
}
@@ -453,8 +455,9 @@ export class LdapDirectoryService implements IDirectoryService {
try {
await this.client.bind(user, pass);
} catch {
} catch (error) {
await this.client.unbind();
throw error;
}
}