From 15ef54c2dc8147ad49cca286d0591aeb5dbaa6f3 Mon Sep 17 00:00:00 2001 From: Max Wu Date: Sat, 17 Feb 2018 00:47:50 +0800 Subject: Fix to show 500 message when got error in parseNoteId Signed-off-by: Max Wu --- lib/response.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/response.js b/lib/response.js index c874ce9c..41e8c336 100644 --- a/lib/response.js +++ b/lib/response.js @@ -146,7 +146,8 @@ function findNote (req, res, callback, include) { var id = req.params.noteId || req.params.shortid models.Note.parseNoteId(id, function (err, _id) { if (err) { - logger.log(err) + logger.error(err) + return response.errorInternalError(res) } models.Note.findOne({ where: { -- cgit v1.2.3