mirror of
https://github.com/appwrite/appwrite
synced 2026-05-16 21:48:45 +00:00
Catch query exception on bulk update/delete
This commit is contained in:
parent
df276692e8
commit
f944ad350e
2 changed files with 4 additions and 0 deletions
|
|
@ -124,6 +124,8 @@ class Delete extends Action
|
|||
throw new Exception($this->getConflictException());
|
||||
} catch (RestrictedException) {
|
||||
throw new Exception($this->getRestrictedException());
|
||||
} catch (QueryException $e) {
|
||||
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
|
||||
}
|
||||
|
||||
foreach ($documents as $document) {
|
||||
|
|
|
|||
|
|
@ -150,6 +150,8 @@ class Update extends Action
|
|||
throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage());
|
||||
} catch (StructureException $e) {
|
||||
throw new Exception($this->getStructureException(), $e->getMessage());
|
||||
} catch (QueryException $e) {
|
||||
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
|
||||
}
|
||||
|
||||
foreach ($documents as $document) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue