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.
This commit is contained in:
parent
497b01bffe
commit
ba4a24809c
|
@ -165,7 +165,7 @@ export const register = async (
|
||||||
|
|
||||||
app.use(errorHandler)
|
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}`)
|
logger.error(`${err.message} ${err.stack}`)
|
||||||
;(req as WebsocketRequest).ws.end()
|
;(req as WebsocketRequest).ws.end()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue