diff --git a/src/utils/loggerUtils.js b/src/utils/loggerUtils.js index 3e9c0aa..075f9ed 100644 --- a/src/utils/loggerUtils.js +++ b/src/utils/loggerUtils.js @@ -64,8 +64,8 @@ module.exports.errorHandler = function(res, msg, type = "Generic", status = 400) * @param {Error} err - Exception to handle */ module.exports.localExceptionHandler = function(err){ - //If we're being verbose - if(config.verbose){ + //If we're being verbose and this isn't just a basic bitch + if(!err.custom && config.verbose){ //Log the error module.exports.dumpError(err); } diff --git a/src/utils/sessionUtils.js b/src/utils/sessionUtils.js index 7c5ad33..655dd46 100644 --- a/src/utils/sessionUtils.js +++ b/src/utils/sessionUtils.js @@ -242,8 +242,11 @@ module.exports.rememberMeMiddleware = function(req, res, next){ res.clearCookie('rememberme.id'); res.clearCookie('rememberme.token'); - //Bitch, Moan, and guess what? That's fuckin' right! COMPLAIN!!!! - return loggerUtils.exceptionHandler(res, err); + //Quietly handle exceptions without pestering the user + loggerUtils.localExceptionHandler(err); + + //Go on with life + next(); }); }else{ //Jump to next middleware, this looks gross but it's only because they made me use .then like a bunch of fucking dicks