Merge pull request #10517 from appwrite/fix-miss-catch

Catch query exception on bulk update/delete
This commit is contained in:
Jake Barnby 2025-09-19 18:16:31 +12:00 committed by GitHub
commit 0b5fc8f0fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -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) {

View file

@ -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) {