From 36ba88297bc48b6e367db62e7967b2c8947cfff3 Mon Sep 17 00:00:00 2001 From: James Allen Date: Tue, 24 May 2016 15:11:14 +0100 Subject: [PATCH] Don't hang request in the event of a spelling backend error --- .../web/app/coffee/Features/Spelling/SpellingController.coffee | 1 + 1 file changed, 1 insertion(+) diff --git a/services/web/app/coffee/Features/Spelling/SpellingController.coffee b/services/web/app/coffee/Features/Spelling/SpellingController.coffee index 86683e2341..973655701b 100644 --- a/services/web/app/coffee/Features/Spelling/SpellingController.coffee +++ b/services/web/app/coffee/Features/Spelling/SpellingController.coffee @@ -12,4 +12,5 @@ module.exports = SpellingController = request(url: Settings.apis.spelling.url + url, method: req.method, headers: req.headers, json: req.body, timeout:TEN_SECONDS) .on "error", (error) -> logger.error err: error, "Spelling API error" + res.status(500).end() .pipe(res)