Catch index exception

This commit is contained in:
fogelito 2025-02-10 09:19:56 +02:00
parent 3092e765cc
commit 5b786e2a68
2 changed files with 4 additions and 1 deletions

View file

@ -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();

View file

@ -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.*",