mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-16 21:56:25 -05:00
dealing with internal errors in express.js
This commit is contained in:
parent
7b0ab14d4c
commit
9ee8d484db
1 changed files with 4 additions and 0 deletions
|
@ -49,6 +49,10 @@ module.exports = function(config_hash) {
|
|||
}
|
||||
} else {
|
||||
Logger.logger.error({err: err}, 'unexpected error: @{!err.message}\n@{err.stack}')
|
||||
if (!res.status || !res.send) {
|
||||
Logger.logger.error('this is an error in express.js, please report this')
|
||||
res.destroy()
|
||||
}
|
||||
if (calls == 1) {
|
||||
res.status(500)
|
||||
res.send({error: 'internal server error'})
|
||||
|
|
Loading…
Reference in a new issue