improve handling of ratchet error
This commit is contained in:
parent
fc17d2cdf8
commit
d7a5734818
4 changed files with 6 additions and 3 deletions
|
|
@ -123,7 +123,9 @@ function postTx (req, res, next) {
|
|||
return res.json(tx)
|
||||
})
|
||||
.catch(err => {
|
||||
if (err instanceof E.StaleTxError) return res.status(404).json({})
|
||||
if (err instanceof E.StaleTxError) return res.status(409).json({})
|
||||
if (err instanceof E.RatchetError) return res.status(409).json({})
|
||||
|
||||
throw err
|
||||
})
|
||||
.catch(next)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue