From 15ef54c2dc8147ad49cca286d0591aeb5dbaa6f3 Mon Sep 17 00:00:00 2001 From: Max Wu Date: Sat, 17 Feb 2018 00:47:50 +0800 Subject: [PATCH] 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(-) diff --git a/lib/response.js b/lib/response.js index c874ce9..41e8c33 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: {