refactor: add transaction ID to stale errors
This commit is contained in:
parent
fb48222203
commit
2b4e531367
2 changed files with 2 additions and 2 deletions
|
|
@ -18,7 +18,7 @@ function atomic (machineTx, pi) {
|
|||
|
||||
return t.oneOrNone(sql, [machineTx.id])
|
||||
.then(row => {
|
||||
if (row && row.tx_version >= machineTx.txVersion) throw new E.StaleTxError('Stale tx')
|
||||
if (row && row.tx_version >= machineTx.txVersion) throw new E.StaleTxError({ txId: machineTx.id })
|
||||
|
||||
return t.any(sql2, [machineTx.id])
|
||||
.then(billRows => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue