From 0c5bb03dcc63179d090a00cea50b17abb907d4f7 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Mon, 26 Aug 2013 21:28:50 +0100 Subject: [PATCH] Additional validation / API error consistency fix --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index 1e64ef9b50..f0d6d3b19b 100644 --- a/index.js +++ b/index.js @@ -81,8 +81,7 @@ function cleanNotifications(req, res, next) { function authAPI(req, res, next) { if (!req.session.user) { // TODO: standardize error format/codes/messages - var err = { code: 42, message: 'Please sign in' }; - res.json(401, { error: err }); + res.json(401, { error: 'Please sign in' }); return; }