mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Catch explicit txn exception
This commit is contained in:
parent
5cd99de6e4
commit
9838571184
1 changed files with 6 additions and 0 deletions
|
|
@ -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());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue