From b18c422b3af07da544bfcd1835c2994cf265807d Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 16 Nov 2023 11:33:51 +0200 Subject: [PATCH] Change Exception message --- app/controllers/api/databases.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/controllers/api/databases.php b/app/controllers/api/databases.php index cc1290b77c..6cbf7268bd 100644 --- a/app/controllers/api/databases.php +++ b/app/controllers/api/databases.php @@ -1650,8 +1650,7 @@ App::post('/v1/databases/:databaseId/collections/:collectionId/attributes/relati \strtolower($attribute->getAttribute('options')['twoWayKey']) === \strtolower($twoWayKey) && $attribute->getAttribute('options')['relatedCollection'] === $relatedCollection->getId() ) { - // Currently, we always throw an Exception even when, We do not want to change $twoWayKsy on $twoWayKeyNull - throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS); + throw new Exception(Exception::ATTRIBUTE_ALREADY_EXISTS, 'Creating more than one "manyToMany" relationship on the same collection is currently not permitted.'); } if (