diff --git a/app/controllers/general.php b/app/controllers/general.php index 7e691d033f..d9d41a16fd 100644 --- a/app/controllers/general.php +++ b/app/controllers/general.php @@ -837,6 +837,9 @@ App::error() case 'Utopia\Database\Exception\Dependency': $error = new AppwriteException(AppwriteException::INDEX_DEPENDENCY, null, previous: $error); break; + case 'Utopia\Database\Exception\Index': + $error = new AppwriteException(AppwriteException::INDEX_INVALID, $error->getMessage(), previous: $error); + break; } $code = $error->getCode(); diff --git a/composer.json b/composer.json index 8f5bb54f79..d0b457b6bd 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "utopia-php/cache": "0.11.*", "utopia-php/cli": "0.15.*", "utopia-php/config": "0.2.*", - "utopia-php/database": "0.56.4", + "utopia-php/database": "dev-index-exception as 0.56.4", "utopia-php/domains": "0.5.*", "utopia-php/dsn": "0.2.1", "utopia-php/framework": "0.33.*",