From ba4a24809c6273a3c449c1608193e3e1523bcedc Mon Sep 17 00:00:00 2001 From: Anmol Sethi Date: Mon, 11 Jan 2021 14:33:46 -0500 Subject: [PATCH] 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. --- src/node/routes/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/routes/index.ts b/src/node/routes/index.ts index a7b7c185..4688d6a2 100644 --- a/src/node/routes/index.ts +++ b/src/node/routes/index.ts @@ -165,7 +165,7 @@ export const register = async ( app.use(errorHandler) - const wsErrorHandler: express.ErrorRequestHandler = async (err, req) => { + const wsErrorHandler: express.ErrorRequestHandler = async (err, req, res, next) => { logger.error(`${err.message} ${err.stack}`) ;(req as WebsocketRequest).ws.end() }