Added logic in case throwErr() is not given a req
parent
dcf522fcb5
commit
4bcf4da286
|
@ -7,7 +7,7 @@ module.exports = {
|
|||
|
||||
// Throw error
|
||||
throwErr: (err, req=null) => {
|
||||
debug(`throwErr(${err.message},${req.url})`)
|
||||
debug(`throwErr(${err.message},${req?req.url:'null'})`)
|
||||
console.error(err.stack)
|
||||
if (req) {
|
||||
if (env.mode==='production') {
|
||||
|
|
Loading…
Reference in New Issue