Skip to content

Commit 5b6d988

Browse files
authored
Merge pull request #1085 from KnpLabs/dependabot/npm_and_yarn/express-5.2.1
chore(deps): bump express from 4.21.2 to 5.2.1
2 parents c4079ef + eb3f1e9 commit 5b6d988

File tree

4 files changed

+321
-346
lines changed

4 files changed

+321
-346
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"license": "MIT",
66
"dependencies": {
77
"bull": "^4.16.5",
8-
"express": "^4.21.2",
8+
"express": "^5.2.1",
99
"puppeteer-core": "^24.34.0",
1010
"ramda": "^0.32.0",
1111
"tree-kill": "^1.2.2",
Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
import { ifElse, pipe, tap } from 'ramda'
21
import { formatException } from '../../../logger'
32

43
// errorMiddleware :: Logger -> Express.Application -> Void
54
export default logger => app =>
6-
app.use(pipe(
7-
tap(error => logger.error(formatException(error))),
8-
ifElse(
9-
(error, req, res) => res.headersSent,
10-
(error, req, res, next) => next(error),
11-
(error, req, res) => res.status(500).send(),
12-
),
13-
))
5+
app.use((error, req, res, next) => {
6+
logger.error(formatException(error))
7+
if (res.headersSent) return next(error)
8+
return res.status(500).send()
9+
})
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// default :: Express.app -> Express.app
2-
export default app => app.get('*', (req, res) => res.status(404).send())
2+
export default app => app.get(/.*/, (req, res) => res.status(404).send())

0 commit comments

Comments
 (0)