Skip to content

Commit

Permalink
Reverted the negate on ok and added debug comment
Browse files Browse the repository at this point in the history
  • Loading branch information
c0untingNumbers committed Nov 14, 2024
1 parent 62d1a37 commit a72926b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion osclient/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package osclient

import (
"context"
"log"
"strings"

"github.com/gophercloud/gophercloud"
Expand All @@ -23,7 +24,8 @@ func CheckUserExists(email string) (bool, error) {
ctx := context.Background()
_, err := users.Get(ctx, identityClient, username).Extract()
if err != nil {
if _, ok := err.(gophercloud.ErrDefault404); !ok {
log.Printf("%T", err)
if _, ok := err.(gophercloud.ErrDefault404); ok {
// User does not exist
return false, nil
}
Expand Down

0 comments on commit a72926b

Please sign in to comment.