diff --git a/internal/rpc/chat/user.go b/internal/rpc/chat/user.go index 057cc6d7..c3fc234a 100644 --- a/internal/rpc/chat/user.go +++ b/internal/rpc/chat/user.go @@ -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 } diff --git a/internal/rpc/chat/utils.go b/internal/rpc/chat/utils.go index b8c1f174..41ebd1bc 100644 --- a/internal/rpc/chat/utils.go +++ b/internal/rpc/chat/utils.go @@ -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 }