3 var env = require('gitter-web-env');
4 var winston = env.logger;
5 var logoutDestroyTokens = require('./logout-destroy-tokens');
7 /* Has to have four args */
8 module.exports = function(err, req, res, next) {
9 if (!req.skipTokenErrorHandler && err && err.gitterAction === 'logout_destroy_user_tokens') {
10 winston.info('token-error-handler: logout_destroy_user_tokens error caught');
12 return logoutDestroyTokens(req, res, next);