From 15e0385723f7e7d3a11dd07065cf7ae181cb7435 Mon Sep 17 00:00:00 2001 From: Darshan Date: Sat, 10 May 2025 11:36:13 +0530 Subject: [PATCH] update: exception name. --- .../Databases/Http/Databases/Collections/Indexes/Action.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Create.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Delete.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/Get.php | 2 +- .../Databases/Http/Databases/Collections/Indexes/XList.php | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php index c1e3f61114..07a32ce122 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Action.php @@ -86,7 +86,7 @@ abstract class Action extends UtopiaAction /** * Get the appropriate grandparent level not found exception. */ - final protected function getGrantParentNotFoundException(): string + final protected function getGrandParentNotFoundException(): string { return $this->isCollectionsAPI() ? Exception::COLLECTION_NOT_FOUND diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php index c18ab69b10..a963640597 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Create.php @@ -89,7 +89,7 @@ class Create extends Action if ($collection->isEmpty()) { // table or collection. - throw new Exception($this->getGrantParentNotFoundException()); + throw new Exception($this->getGrandParentNotFoundException()); } $count = $dbForProject->count('indexes', [ diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php index a208e059f6..70df7c4f7a 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Delete.php @@ -82,7 +82,7 @@ class Delete extends Action if ($collection->isEmpty()) { // table or collection. - throw new Exception($this->getGrantParentNotFoundException()); + throw new Exception($this->getGrandParentNotFoundException()); } $index = $dbForProject->getDocument('indexes', $db->getInternalId() . '_' . $collection->getInternalId() . '_' . $key); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php index fa10406f2a..466d6fa99e 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/Get.php @@ -71,7 +71,7 @@ class Get extends Action if ($collection->isEmpty()) { // table or collection. - throw new Exception($this->getGrantParentNotFoundException()); + throw new Exception($this->getGrandParentNotFoundException()); } $index = $collection->find('key', $key, 'indexes'); diff --git a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php index 733e6854b2..d44c80b393 100644 --- a/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php +++ b/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Indexes/XList.php @@ -77,7 +77,7 @@ class XList extends Action if ($collection->isEmpty()) { // table or collection. - throw new Exception($this->getGrantParentNotFoundException()); + throw new Exception($this->getGrandParentNotFoundException()); } $queries = Query::parseQueries($queries);