From 79a694b5c8752b2925d989ec0a2e0b88a88f953b Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 20 Oct 2015 09:55:12 +0100 Subject: [PATCH] for spelling attach error handler first --- .../web/app/coffee/Features/Spelling/SpellingController.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/app/coffee/Features/Spelling/SpellingController.coffee b/services/web/app/coffee/Features/Spelling/SpellingController.coffee index f87504e5d0..3ac130fb08 100644 --- a/services/web/app/coffee/Features/Spelling/SpellingController.coffee +++ b/services/web/app/coffee/Features/Spelling/SpellingController.coffee @@ -8,7 +8,7 @@ module.exports = SpellingController = url = "/user/#{req.session.user._id}#{url}" req.headers["Host"] = Settings.apis.spelling.host getReq = request(url: Settings.apis.spelling.url + url, method: req.method, headers: req.headers, json: req.body) - getReq.pipe(res) getReq.on "error", (error) -> logger.error err: error, "Spelling API error" res.sendStatus 500 + getReq.pipe(res)