Improve transaction errors (#194)
* Improve transaction errors * Fix standard styling errors
This commit is contained in:
parent
3cffbedd9a
commit
b47af59a7f
1 changed files with 25 additions and 25 deletions
|
|
@ -141,8 +141,8 @@ function postTx (req, res, next) {
|
|||
logger.warn('Harmless DB conflict, the query will be retried.')
|
||||
return res.status(204).json({})
|
||||
}
|
||||
if (err instanceof E.StaleTxError) return res.status(409).json({})
|
||||
if (err instanceof E.RatchetError) return res.status(409).json({})
|
||||
if (err instanceof E.StaleTxError) return res.status(409).json({ errorType: 'stale' })
|
||||
if (err instanceof E.RatchetError) return res.status(409).json({ errorType: 'ratchet' })
|
||||
|
||||
throw err
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue