diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index b46302be07..b04657e07f 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -241,6 +241,7 @@ App::post('/v1/projects') $attributes = \array_map(fn ($attribute) => new Document($attribute), $collection['attributes']); $indexes = \array_map(fn (array $index) => new Document($index), $collection['indexes']); + try { $dbForProject->createCollection($key, $attributes, $indexes); } catch (Duplicate) {