From e4aeaa39ec7cee8dab4d6015302f7c0f3339a663 Mon Sep 17 00:00:00 2001 From: Ayush Sharma <89914602+ayush3160@users.noreply.github.com> Date: Wed, 15 Jan 2025 11:36:30 +0530 Subject: [PATCH] fix: return only message when no projects are found (#5011) Signed-off-by: Ayush Sharma Co-authored-by: Saranya Jena --- 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)