server: fix bug in ListUsers to handle no users

This commit is contained in:
2026-05-24 00:34:30 +00:00
parent 35cda247f2
commit e89ca23a42
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ func dbGetAllUsers() ([]*User, error) {
}
if len(users) == 0 {
slog.Debug("db: no users found")
return nil, errors.New("no users found")
return nil, ErrUserNotFound
}
slog.Debug("db: user list returned")