mirror of https://github.com/kern/filepizza
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
368 B
JavaScript
20 lines
368 B
JavaScript
module.exports = function (err, req, res, next) {
|
|
|
|
var status = err.status || 500
|
|
var message = err.message || ''
|
|
var stack = process.env.NODE_ENV === 'production' ? null : err.stack || null
|
|
|
|
req.url = '/error'
|
|
res.status(status)
|
|
res.locals.data = {
|
|
ErrorStore: {
|
|
status: status,
|
|
message: message,
|
|
stack: stack
|
|
}
|
|
}
|
|
|
|
next()
|
|
|
|
}
|