mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-13 07:56:23 +00:00
fix: errorsController
not properly printing errors when headers already sent
This commit is contained in:
parent
eb4057d10c
commit
26ae853362
@ -13,8 +13,8 @@ const self = {
|
||||
|
||||
self.handleError = (req, res, error) => {
|
||||
if (!res || res.headersSent) {
|
||||
console.error('Unexpected missing "res" object or headers alredy sent.')
|
||||
return console.trace()
|
||||
console.error('Error: Unexpected missing "res" object or headers alredy sent.')
|
||||
return console.error(error)
|
||||
}
|
||||
|
||||
// Error messages that can be returned to users
|
||||
|
Loading…
Reference in New Issue
Block a user