917 app.get('/foo', function (req, res, next) {
918 calls.push('/foo');
919▶ next(new Error('fail'));
920 });
921
· · ·
927 res.json({
928 calls: calls,
929▶ error: err.message
930 })
931 })
· · ·
933 request(app)
934 .get('/foo')
935▶ .expect(200, { calls: ['/foo/:bar?', '/foo'], error: 'fail' }, done)
936 })
937
· · ·
940
941 function fn1(req, res, next) {
942▶ next(new Error('boom!'));
943 }
944
· · ·
954
955 app.use(function (err, req, res, next) {
956▶ res.end('error!');
957 })
958
+ 28 more matches in this file