diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php index 7df3172484..580dc951d4 100644 --- a/app/controllers/api/database.php +++ b/app/controllers/api/database.php @@ -89,6 +89,8 @@ $attributesCallback = function ($collectionId, $attribute, $response, $dbForInte ])); } catch (DuplicateException $th) { throw new Exception('Attribute already exists', 409); + } catch (LimitException $e) { + throw new Exception($e->getMessage(), 400); } $dbForInternal->purgeDocument('collections', $collectionId);