- logger.info('User %s does not have right %s to access to %s.', user.username, UserRight[userRight], req.path)
- return res.sendStatus(403)
+ const message = `User ${user.username} does not have right ${userRight} to access to ${req.path}.`
+ logger.info(message)
+
+ return res.fail({
+ status: HttpStatusCode.FORBIDDEN_403,
+ message
+ })