Merge pull request #1859 from RafaelTaranto/fix/cash-out-handling
LAM-1430 fix: keep handling non error code as errors
This commit is contained in:
commit
33a310779b
1 changed files with 6 additions and 1 deletions
|
|
@ -53,7 +53,12 @@ function getTx(req, res, next) {
|
|||
return helpers
|
||||
.fetchStatusTx(req.params.id, req.query.status)
|
||||
.then(r => res.json(r))
|
||||
.catch(next)
|
||||
.catch(err => {
|
||||
if (err.name === 'HTTPError') {
|
||||
return res.status(err.code).send(err.message)
|
||||
}
|
||||
next(err)
|
||||
})
|
||||
}
|
||||
|
||||
return next(httpError('Not Found', 404))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue