1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00

feat: use general server errors in projects API

This commit is contained in:
Christy Jacob 2022-02-07 00:56:48 +04:00
parent 6e88817831
commit 3b420fdeed

View file

@ -557,11 +557,11 @@ App::delete('/v1/projects/:projectId')
; ;
if (!$dbForConsole->deleteDocument('teams', $project->getAttribute('teamId', null))) { 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)) { 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(); $response->noContent();