expressjs / expressjs/express

Route param error handle

Open
#2,483 6 comments 0 reactions 0 assignees View on GitHub
5.x enhancement
Dominant language
JavaScript
Stars
69.5k
Forks
25k
Avg merge
4d 20h
Merged PRs (30d)
9

Description

```
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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.