9var app = module.exports = express();
10
11▶// create an error with .status. we
12// can then use the property in our
13// custom error handler (Connect respects this prop as well)
· · ·
13▶// custom error handler (Connect respects this prop as well)
14
15function error(status, msg) {
· · ·
15▶function error(status, msg) {
16 var err = new Error(msg);
17 err.status = status;
· · ·
16▶ var err = new Error(msg);
17 err.status = status;
18 return err;
· · ·
32
33 // key isn't present
34▶ if (!key) return next(error(400, 'api key required'));
35
36 // key is invalid
+ 4 more matches in this file