Skip to content

Documentation for middleware with 4 arguments should be linked from "writing middleware" #1069

Open
@denilsonsa

Description

@denilsonsa

At http://expressjs.com/en/guide/writing-middleware.html, I see no mention of the error handling middleware, or even that 4-argument middleware exists. That page should have a mention (and a link to full documentation) just like how using middleware and app.use() already have.


Bonus feedback (that should probably be a separate issue anyway):

https://dev.to/nedsoft/central-error-handling-in-express-3aej - This third-party page notes that “The error-handling middleware must be the last among other middleware and routes for it to function correctly.”. If this note is so important, I think it should exist in the official documentation (or it should be more visible).


This was originally submitted as expressjs/express#4058

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions