mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 07:08:58 +08:00
chore: change in error message on register (#1068)
This commit is contained in:
parent
8a7cbc8ad3
commit
67b4290846
@ -125,7 +125,11 @@ func validateInvite(ctx context.Context, req *RegisterRequest) (*model.Invitatio
|
||||
return nil, errors.Wrap(err.Err, "Failed to read from DB")
|
||||
}
|
||||
|
||||
if invitation == nil || invitation.Token != req.InviteToken {
|
||||
if invitation == nil {
|
||||
return nil, ErrorAskAdmin
|
||||
}
|
||||
|
||||
if invitation.Token != req.InviteToken {
|
||||
return nil, ErrorInvalidInviteToken
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ var (
|
||||
ErrorInvalidRole = errors.New("Invalid role")
|
||||
|
||||
ErrorInvalidInviteToken = errors.New("Invalid invite token")
|
||||
ErrorAskAdmin = errors.New("You are not allowed to create an account. Please ask your admin to send an invite link")
|
||||
)
|
||||
|
||||
func randomHex(sz int) (string, error) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user