mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 17:08:45 +00:00
update: remove not-found and index dependency exceptions from global handler.
This commit is contained in:
parent
dc439d1a16
commit
86a9598a51
2 changed files with 1 additions and 18 deletions
|
|
@ -1177,24 +1177,6 @@ App::error()
|
|||
case 'Utopia\Database\Exception\Timeout':
|
||||
$error = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $error);
|
||||
break;
|
||||
case 'Utopia\Database\Exception\NotFound':
|
||||
$error = new AppwriteException(
|
||||
$isTablesAPI
|
||||
? AppwriteException::TABLE_NOT_FOUND
|
||||
: AppwriteException::COLLECTION_NOT_FOUND,
|
||||
$error->getMessage(),
|
||||
previous: $error
|
||||
);
|
||||
break;
|
||||
case 'Utopia\Database\Exception\Dependency':
|
||||
$error = new AppwriteException(
|
||||
$isTablesAPI
|
||||
? AppwriteException::COLUMN_INDEX_DEPENDENCY
|
||||
: AppwriteException::INDEX_DEPENDENCY,
|
||||
null,
|
||||
previous: $error
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
$code = $error->getCode();
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ class Delete extends Action
|
|||
$collection->getAttribute('indexes'),
|
||||
$dbForProject->getAdapter()->getSupportForCastIndexArray(),
|
||||
);
|
||||
|
||||
if (!$validator->isValid($attribute)) {
|
||||
throw new Exception($this->getIndexDependencyException());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue