webaccess: Log hook errors

debug-select-formatting
Richard Hansen 2020-08-29 00:24:58 -04:00 committed by John McLear
parent 8919608d45
commit 7bd5435f50
1 changed files with 1 additions and 0 deletions

View File

@ -42,6 +42,7 @@ exports.authnFailureDelayMs = 1000;
exports.checkAccess = (req, res, next) => {
const hookResultMangle = (cb) => {
return (err, data) => {
if (err != null) httpLogger.error(`Error during access check: ${err}`);
return cb(!err && data.length && data[0]);
};
};