Catch explicit txn exception

This commit is contained in:
Jake Barnby 2025-08-15 00:37:18 +12:00
parent 5cd99de6e4
commit 9838571184
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -201,6 +201,12 @@ class Update extends Action
]));
throw new Exception(Exception::TRANSACTION_CONFLICT);
} catch (TransactionException $e) {
$dbForProject->updateDocument('transactions', $transactionId, new Document([
'status' => 'failed',
]));
throw new Exception(Exception::TRANSACTION_FAILED, $e->getMessage());
}
});
}