From 3b420fdeed3a710e0b13d96e4b035efe1ea304a8 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Mon, 7 Feb 2022 00:56:48 +0400 Subject: [PATCH] feat: use general server errors in projects API --- app/controllers/api/projects.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 893300d9b2..4fd26873cd 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -557,11 +557,11 @@ App::delete('/v1/projects/:projectId') ; if (!$dbForConsole->deleteDocument('teams', $project->getAttribute('teamId', null))) { - throw new Exception('Failed to remove project team from DB', 500, Exception::COLLECTION_DELETION_FAILED); + throw new Exception('Failed to remove project team from DB', 500, Exception::GENERAL_SERVER_ERROR); } if (!$dbForConsole->deleteDocument('projects', $projectId)) { - throw new Exception('Failed to remove project from DB', 500, Exception::COLLECTION_DELETION_FAILED); + throw new Exception('Failed to remove project from DB', 500, Exception::GENERAL_SERVER_ERROR); } $response->noContent();