From 94e330149f3e9ed1a8865aee99db1bc75a2728e4 Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Wed, 4 Aug 2021 17:04:48 -0400 Subject: [PATCH] Catch limit exception on attributes --- app/controllers/api/database.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/api/database.php b/app/controllers/api/database.php index 7df317248..580dc951d 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);