From 602514bc8c31a554b1723fd994306c1515b3999d Mon Sep 17 00:00:00 2001 From: cel Date: Thu, 14 Dec 2017 13:55:48 -0800 Subject: Fix error --- lib/serve.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/serve.js') diff --git a/lib/serve.js b/lib/serve.js index 066f5d4..9dec11b 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -578,7 +578,11 @@ Serve.prototype.compose = function (ext) { channel: '', redirectToPublishedMsg: true, }, function (err, composer) { - if (err) return cb(err) + if (err) return pull( + pull.once(u.renderError(err).outerHTML), + self.wrapPage('compose'), + self.respondSink(500) + ) pull( pull.once(u.toHTML(composer)), self.wrapPage('compose'), -- cgit v1.2.3