From 48711730197c304ec7ed93a12b8728c69ace0d56 Mon Sep 17 00:00:00 2001 From: Liran Tal Date: Mon, 12 Jan 2015 23:32:41 +0200 Subject: [PATCH] correcting 500 server error to 400 client error --- app/controllers/articles.server.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/articles.server.controller.js b/app/controllers/articles.server.controller.js index 7b991bf73c..08661f46cc 100644 --- a/app/controllers/articles.server.controller.js +++ b/app/controllers/articles.server.controller.js @@ -90,7 +90,7 @@ exports.list = function(req, res) { exports.articleByID = function(req, res, next, id) { if (!mongoose.Types.ObjectId.isValid(id)) { - return res.status(500).send({ + return res.status(400).send({ message: 'Article is invalid' }); }