mirror of
https://github.com/cdr/code-server.git
synced 2025-12-06 16:34:35 +01:00
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
1 changed files with 1 additions and 1 deletions
|
|
@ -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 a new issue