Merge pull request #5161 from overleaf/jpa-drop-errorhandler

[misc] drop errorhandler middleware

GitOrigin-RevId: e95628b6ba5808e4bf4c1df291b6d9eb91d9bc10
This commit is contained in:
Jakob Ackermann
2021-09-21 08:03:17 +00:00
committed by Copybot
parent 2fdff8288b
commit 9e24affe7a
6 changed files with 159 additions and 34 deletions
-9
View File
@@ -15,7 +15,6 @@ logger.initialize('chat')
const Path = require('path')
const express = require('express')
const bodyParser = require('body-parser')
const errorHandler = require('errorhandler')
const app = express()
const server = require('http').createServer(app)
const Router = require('./router')
@@ -25,14 +24,6 @@ app.use(bodyParser.urlencoded({ extended: true }))
app.use(metrics.http.monitor(logger))
metrics.injectMetricsRoute(app)
if (app.get('env') === 'development') {
app.use(errorHandler({ dumpExceptions: true, showStack: true }))
}
if (app.get('env') === 'production') {
app.use(errorHandler())
}
Router.route(app)
module.exports = {
-9
View File
@@ -1642,15 +1642,6 @@
"is-arrayish": "^0.2.1"
}
},
"errorhandler": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/errorhandler/-/errorhandler-1.5.1.tgz",
"integrity": "sha512-rcOwbfvP1WTViVoUjcfZicVzjhjTuhSMntHh6mW3IrEiyE6mJyXvsToJUJGlGlw/2xU9P5whlWNGlIDVeCiT4A==",
"requires": {
"accepts": "~1.3.7",
"escape-html": "~1.0.3"
}
},
"es-abstract": {
"version": "1.18.5",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz",
-1
View File
@@ -23,7 +23,6 @@
"@overleaf/settings": "^2.1.1",
"async": "^3.2.0",
"body-parser": "^1.19.0",
"errorhandler": "^1.5.1",
"express": "4.17.1",
"logger-sharelatex": "^2.2.1",
"mongodb": "^3.6.0"