mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-11 22:09:05 +08:00
fix: add error message in login (#8010)
* fix: add error message in login * fix: use newf
This commit is contained in:
parent
0bfe53a93c
commit
a1c7a948fa
@ -310,7 +310,9 @@ func (m *Module) GetAuthenticatedUser(ctx context.Context, orgID, email, passwor
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(user) == 1 {
|
||||
if len(user) == 0 {
|
||||
return nil, errors.Newf(errors.TypeInvalidInput, errors.CodeInvalidInput, "user with email: %s does not exist", email)
|
||||
} else if len(user) == 1 {
|
||||
dbUser = &user[0].User
|
||||
} else {
|
||||
return nil, errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "please provide an orgID")
|
||||
|
Loading…
x
Reference in New Issue
Block a user