external ldap: show proper error message on timeout
This commit is contained in:
@@ -40,6 +40,8 @@ async function setConfig(req, res, next) {
|
||||
if ('bindDn' in req.body && typeof req.body.bindDn !== 'string') return next(new HttpError(400, 'bindDn must be a non empty string'));
|
||||
if ('bindPassword' in req.body && typeof req.body.bindPassword !== 'string') return next(new HttpError(400, 'bindPassword must be a string'));
|
||||
|
||||
req.clearTimeout(); // remove ldap server can take a bit to respond
|
||||
|
||||
const [error] = await safe(externalLdap.setConfig(req.body, AuditSource.fromRequest(req)));
|
||||
if (error) return next(BoxError.toHttpError(error));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user