mirror of
https://github.com/appwrite/appwrite
synced 2026-05-24 09:28:40 +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());
|
throw new Exception($this->getConflictException());
|
||||||
} catch (RestrictedException) {
|
} catch (RestrictedException) {
|
||||||
throw new Exception($this->getRestrictedException());
|
throw new Exception($this->getRestrictedException());
|
||||||
|
} catch (QueryException $e) {
|
||||||
|
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($documents as $document) {
|
foreach ($documents as $document) {
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,8 @@ class Update extends Action
|
||||||
throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage());
|
throw new Exception(Exception::RELATIONSHIP_VALUE_INVALID, $e->getMessage());
|
||||||
} catch (StructureException $e) {
|
} catch (StructureException $e) {
|
||||||
throw new Exception($this->getStructureException(), $e->getMessage());
|
throw new Exception($this->getStructureException(), $e->getMessage());
|
||||||
|
} catch (QueryException $e) {
|
||||||
|
throw new Exception(Exception::GENERAL_QUERY_INVALID, $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($documents as $document) {
|
foreach ($documents as $document) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue