未验证 提交 ba4a2480 编写于 作者: A Anmol Sethi

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.
上级 497b01bf
......@@ -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()
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册