Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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‎

Lines changed: 1 addition & 1 deletion
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)

AltStyle によって変換されたページ (->オリジナル) /