diff --git a/src/ldap.js b/src/ldap.js index f088b2263..249ec3983 100644 --- a/src/ldap.js +++ b/src/ldap.js @@ -552,7 +552,7 @@ async function authenticateSftp(req, res, next) { } async function loadSftpConfig(req, res, next) { - const [error, servicesConfig] = await settings.getServicesConfig(); + const [error, servicesConfig] = await safe(settings.getServicesConfig()); if (error) return next(new ldap.OperationsError(error.toString())); const sftpConfig = servicesConfig['sftp'] || {};