From eb41a90b80f53b33d5a74b7175eaf5a4c99215d6 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Tue, 27 Aug 2013 19:42:45 -0700 Subject: [PATCH] fix app-level error delegation, always delgate --- lib/context.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/context.js b/lib/context.js index a2d3c61..ea60413 100644 --- a/lib/context.js +++ b/lib/context.js @@ -562,10 +562,12 @@ module.exports = { */ onerror: function(err){ + this.app.onerror(err); + // nothing we can do here other // than delegate to the app-level // handler and log. - if (this.headerSent) return this.app.onerror(err); + if (this.headerSent) return; // err.status support if (err.status) {