From ca546f183d10e964809cb2fb699eb5e0b943954d Mon Sep 17 00:00:00 2001 From: AndrewZuo01 Date: Fri, 15 Dec 2023 11:01:36 +0800 Subject: [PATCH] fix bug login.go --- internal/rpc/chat/login.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/rpc/chat/login.go b/internal/rpc/chat/login.go index 1659dd6b..0472fa22 100644 --- a/internal/rpc/chat/login.go +++ b/internal/rpc/chat/login.go @@ -95,14 +95,14 @@ func (o *chatSvr) SendVerifyCode(ctx context.Context, req *chat.SendVerifyCodeRe if req.Email == "" { _, err := o.Database.TakeAttributeByPhone(ctx, req.AreaCode, req.PhoneNumber) if o.Database.IsNotFound(err) { - return nil, errs.ErrRecordNotFound.Wrap("phone unregistered") + return nil, eerrs.ErrAccountNotFound.Wrap("phone unregistered") } else if err != nil { return nil, err } } else { _, err := o.Database.TakeAttributeByEmail(ctx, req.Email) if o.Database.IsNotFound(err) { - return nil, errs.ErrRecordNotFound.Wrap("email unregistered") + return nil, eerrs.ErrAccountNotFound.Wrap("email unregistered") } else if err != nil { return nil, err }