From f237270074c07e9e2c3492d6ece1f8c8be1d585a Mon Sep 17 00:00:00 2001 From: stropitek Date: Thu, 7 Sep 2017 00:47:53 +0200 Subject: [PATCH] ldap sync propagate error --- src/couch/group.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/couch/group.js b/src/couch/group.js index 6d507760..66caa604 100644 --- a/src/couch/group.js +++ b/src/couch/group.js @@ -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) { @@ -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; } }