From dbb91fc77db3e87bbe70fa881f67d53dc6c1aa0e Mon Sep 17 00:00:00 2001
From: Neil Schark <neil.schark@h-da.de>
Date: Fri, 26 Jul 2024 09:43:08 +0000
Subject: [PATCH] add missing return

---
 controller/northbound/server/auth.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/controller/northbound/server/auth.go b/controller/northbound/server/auth.go
index 6d9e6410d..0fd198a1a 100644
--- a/controller/northbound/server/auth.go
+++ b/controller/northbound/server/auth.go
@@ -185,7 +185,7 @@ func (s AuthServer) handleLogout(ctx context.Context, userName string) error {
 
 		err = removeTokenFromUserIfExists(storedUser, token)
 		if err != nil {
-			status.Errorf(codes.Aborted, "Error removing token from user, it was either already logged out or otherwise not found")
+			return status.Errorf(codes.Aborted, "Error removing token from user, it was either already logged out or otherwise not found")
 		}
 
 		err = s.userService.Update(&rbac.User{UserID: storedUser.ID(),
-- 
GitLab