1
0
mirror of /repos/Prototyper.git synced 2025-12-30 06:31:32 +01:00

show error when error occurs

This commit is contained in:
Aiko Mastboom 2013-04-28 17:13:37 +02:00
parent 8ec03c1490
commit 6d1805df8a

View File

@ -22,7 +22,7 @@ module.exports = function (options, res, next) {
if (/Data not found*/.test(err.message)) {
res.status(404);
}
return next(JSON.stringify( err));
return next(err);
}
var contentType = getMimeType(options.ext);
res.setHeader('Content-Type', contentType);