Merge pull request #728 from hackmdio/fix-show-error-in-parseNoteId

Fix to show 500 message when got error in parseNoteId
This commit is contained in:
Christoph (Sheogorath) Kern 2018-02-17 17:32:26 +01:00 committed by GitHub
commit e4783837ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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: {