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 (