for spelling attach error handler first
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user