mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 14:08:59 +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 {
|
if err != nil {
|
||||||
return nil, err
|
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
|
dbUser = &user[0].User
|
||||||
} else {
|
} else {
|
||||||
return nil, errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "please provide an orgID")
|
return nil, errors.New(errors.TypeInvalidInput, errors.CodeInvalidInput, "please provide an orgID")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user