From b8f51ce7569687d326bf5d5e44eace63c6105621 Mon Sep 17 00:00:00 2001 From: Ivan Socolsky Date: Mon, 18 Jan 2016 13:22:30 -0300 Subject: [PATCH] fix error condition --- lib/expressapp.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/expressapp.js b/lib/expressapp.js index af850fb..72f6dc7 100644 --- a/lib/expressapp.js +++ b/lib/expressapp.js @@ -508,12 +508,8 @@ ExpressApp.prototype.start = function(opts, cb) { ts: +req.query.ts, }; server.getFiatRate(opts, function(err, rates) { - if (err) returnError({ - code: 500, - message: err, - }); + if (err) return returnError(err, res, req); res.json(rates); - res.end(); }); }); });