-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
app.use should include a 4-arity example #635
Comments
(It might also be worth discussing what happens if the middleware throws an unhandled exception in the current or later ticks - in a brief scan of the |
It's a god point and a reasonable suggestion. That section has lots of examples, so it should have at least one of error-handling mw. I'll add something as soon as I have a chance. |
prolly not gonna have time, sorry :( |
34cc3f3 fixes this. |
Thanks! Kevin Burke On Mon, Jun 27, 2016 at 1:18 PM, Hage Yaapa [email protected]
|
Thanks @hacksparrow ! |
It was unclear on http://expressjs.com/en/4x/api.html#app.use how you can call
app.use
with a 4-arity middleware, or where you're supposed to integrate a 4-arity middleware; the error handling docs (http://expressjs.com/en/guide/error-handling.html) cover this, but I also expected to see at least a mention of this behavior in the mainapp.use
docs.I tried:
(err
The
app.use
docs link to the middleware page, which discuss this, but it would be nice if there was at least one example in the Application docs that covered the 4-arity argument,app.use(function(err, req, res, next))
.(at least until expressjs/express#2896 gets resolved)
The text was updated successfully, but these errors were encountered: