Skip to content

Commit

Permalink
fix: change register error
Browse files Browse the repository at this point in the history
  • Loading branch information
icey-yu committed Oct 24, 2024
1 parent 7f23ada commit c76b39f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/rpc/chat/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (o *chatSvr) checkUpdateInfo(ctx context.Context, req *chat.UpdateUserInfoR
}
_, err := o.Database.TakeCredentialByAccount(ctx, req.Email.GetValue())
if err == nil {
return eerrs.ErrAccountAlreadyRegister.Wrap()
return eerrs.ErrEmailAlreadyRegister.Wrap()
} else if !dbutil.IsDBNotFound(err) {
return err
}
Expand Down
2 changes: 1 addition & 1 deletion internal/rpc/chat/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (o *chatSvr) checkRegisterInfo(ctx context.Context, user *chat.RegisterUser
}
_, err := o.Database.TakeAttributeByAccount(ctx, user.Email)
if err == nil {
return eerrs.ErrAccountAlreadyRegister.Wrap()
return eerrs.ErrEmailAlreadyRegister.Wrap()
} else if !dbutil.IsDBNotFound(err) {
return err
}
Expand Down

0 comments on commit c76b39f

Please sign in to comment.