Catch query exception on bulk update/delete

This commit is contained in:
Jake Barnby 2025-09-19 17:32:34 +12:00
parent df276692e8
commit f944ad350e
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
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) {