From 8a213a851c31efc8832d8f4a4b73cd30c719cddc Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Wed, 9 Feb 2022 22:06:44 +0000 Subject: [PATCH] add error logging --- user/handler/handler.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/user/handler/handler.go b/user/handler/handler.go index 8badeb1..1355d5c 100644 --- a/user/handler/handler.go +++ b/user/handler/handler.go @@ -260,11 +260,16 @@ func (s *User) VerifyEmail(ctx context.Context, req *pb.VerifyEmailRequest, rsp // check the token exists tenant, email, err := s.domain.ReadToken(ctx, req.Token) if err != nil { + logger.Error("Failed to read token: %v", err) return err } // update the user - return s.domain.MarkVerified(ctx, tenant, email) + err = s.domain.MarkVerified(ctx, tenant, email) + if err != nil { + logger.Error("Failed to mark email: %s for tenant: %s as verified: %v", email, tenant, err) + } + return err } func (s *User) SendVerificationEmail(ctx context.Context, req *pb.SendVerificationEmailRequest, rsp *pb.SendVerificationEmailResponse) error {