bug fixes

This commit is contained in:
Josh Harvey 2017-07-09 23:37:23 +03:00
parent 5987f288a7
commit 836e6a8cf0
3 changed files with 7 additions and 3 deletions

View file

@ -100,7 +100,11 @@ function postTx (req, res, next) {
return Tx.post(_.set('deviceId', req.deviceId, req.body), pi)
.then(tx => {
if (tx.errorCode) throw httpError(tx.error, 500)
if (tx.errorCode) {
logger.error(tx.error)
throw httpError(tx.error, 500)
}
return res.json(tx)
})
.catch(next)