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(); }); }); });