From 70c5bcea209bcf9037e29526d5005efe60557bc1 Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Tue, 4 Aug 2015 10:52:41 -0700 Subject: [PATCH] fix error message string --- common/models/user.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/models/user.js b/common/models/user.js index e4f5360444..3c7e54cbb3 100644 --- a/common/models/user.js +++ b/common/models/user.js @@ -161,9 +161,9 @@ module.exports = function(User) { if (!username) { // Zalgo!! return nextTick(() => { - cb( - new TypeError('FCC: username should be a string but got %s', username) - ); + cb(new TypeError( + `username should be a string but got ${ username }` + )); }); } User.findOne({ where: { username } }, (err, user) => { @@ -171,7 +171,7 @@ module.exports = function(User) { return cb(err); } if (!user || user.username !== username) { - return cb(new Error('FCC: no user found for %s', username)); + return cb(new Error(`no user found for ${ username }`)); } const aboutUser = getAboutProfile(user); return cb(null, aboutUser);