diff --git a/lib/application.js b/lib/application.js index 5750d96..8b6a78b 100644 --- a/lib/application.js +++ b/lib/application.js @@ -129,11 +129,11 @@ app.callback = function(){ if (!this.listeners('error').length) this.on('error', this.onerror); - return function(req, res){ + return function handleRequest(req, res){ res.statusCode = 404; var ctx = self.createContext(req, res); onFinished(res, ctx.onerror); - fn.call(ctx).then(function () { + fn.call(ctx).then(function handleResponse() { respond.call(ctx); }).catch(ctx.onerror); }