diff --git a/lib/routes/txRoutes.js b/lib/routes/txRoutes.js index 8e2e6c5a..218d223f 100644 --- a/lib/routes/txRoutes.js +++ b/lib/routes/txRoutes.js @@ -17,7 +17,12 @@ function postTx (req, res, next) { .then(tx => { if (tx.errorCode) { logger.error(tx.error) - throw httpError(tx.error, 500) + switch (tx.errorCode) { + case 'InsufficientFundsError': + throw httpError(tx.error, 570) + default: + throw httpError(tx.error, 500) + } } return res.json(tx)