Add missing safe()

This commit is contained in:
Girish Ramakrishnan
2021-08-31 08:37:16 -07:00
parent c8c4ee898d
commit 6027397961

View File

@@ -29,7 +29,7 @@ async function authorizeApp(req, res, next) {
return next();
}
const [error, app] = await apps.getByIpAddress(req.connection.remoteAddress);
const [error, app] = await safe(apps.getByIpAddress(req.connection.remoteAddress));
if (error) return next(new HttpError(500, error));
if (!app) return next(new HttpError(401, 'Unauthorized'));