Skip to content

Fix Express error handler middleware (needs 4 arguments)

Eric Eastwood requested to merge fix-express-error-handler into develop

Fix Express error handler middleware (needs 4 arguments)

Error-handling middleware always takes four arguments. You must provide four arguments to identify it as an error-handling middleware function.

https://expressjs.com/en/api.html#app.use

This regressed in https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1477#note_193491720


Noticed while working onhttps://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1480 because I saw TypeError: res.format is not a function failures in the pipelines, https://gitlab.com/gitlab-org/gitter/webapp/-/jobs/254833067

Edited by Eric Eastwood

Merge request reports