From 9fcc82a3f0593e83230ae004ab6cb2770caf002a Mon Sep 17 00:00:00 2001 From: Ayush Sharma Date: Thu, 2 Jan 2025 09:28:47 +0530 Subject: [PATCH] fix: return only message when no projects are found Signed-off-by: Ayush Sharma --- chaoscenter/authentication/api/handlers/rest/project_handler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/chaoscenter/authentication/api/handlers/rest/project_handler.go b/chaoscenter/authentication/api/handlers/rest/project_handler.go index 52e95a2932b..8838ba9a70b 100644 --- a/chaoscenter/authentication/api/handlers/rest/project_handler.go +++ b/chaoscenter/authentication/api/handlers/rest/project_handler.go @@ -138,6 +138,7 @@ func GetProjectsByUserID(service services.ApplicationService) gin.HandlerFunc { c.JSON(http.StatusOK, gin.H{ "message": "No projects found", }) + return } if err != nil { log.Error(err)