Skip to content

Commit

Permalink
ldap sync propagate error
Browse files Browse the repository at this point in the history
  • Loading branch information
stropitek committed Sep 8, 2017
1 parent d7801f1 commit f237270
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/couch/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ const methods = {
if (group.groupType !== 'ldap') {
throw new CouchError('Cannot sync ldap group', 'bad argument');
}
syncOneLdapGroup(this, group);
await syncOneLdapGroup(this, group);
},

async syncLDAPGroups(groups) {
Expand Down Expand Up @@ -237,6 +237,8 @@ async function syncOneLdapGroup(ctx, group) {
} catch (e) {
debug.error('Error while syncing ldap', e);
if (client) client.destroy();
// Propagate error to client
throw e;
}
}

Expand Down

0 comments on commit f237270

Please sign in to comment.