Skip to content

Commit

Permalink
fix: change register error (#602)
Browse files Browse the repository at this point in the history
  • Loading branch information
icey-yu authored Oct 24, 2024
1 parent 7f23ada commit fca46b8
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 fca46b8

Please sign in to comment.