Skip to content

Commit ba4a248

Browse files
committed
routes/index.ts: Correctly register wsErrorHandler
express requires all 4 arguments to be declared for a error handler. It's very unfortunate that our types do not handle this.
1 parent 497b01b commit ba4a248

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node/routes/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ export const register = async (
165165

166166
app.use(errorHandler)
167167

168-
const wsErrorHandler: express.ErrorRequestHandler = async (err, req) => {
168+
const wsErrorHandler: express.ErrorRequestHandler = async (err, req, res, next) => {
169169
logger.error(`${err.message} ${err.stack}`)
170170
;(req as WebsocketRequest).ws.end()
171171
}

0 commit comments

Comments
 (0)