Skip to content

Route param error handle #2483

Open
Open
@cosmosgenius

Description

@cosmosgenius
var webapps = express.Router();
module.exports = webapps;

function handleError(err, req, res, next) {
    //this function is not executed
    res.send("hello");
    next();
}

webapps.param("app", function(req, res, next, name) {
    next("asfaf");
});

webapps.route("/:app")
    .all(handleError);

I am expected handleError to be executed and send a response of "hello", but instead "asfaf" is being send with status 500.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions