Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: log errors inside VerifyPhoneCode #470

Merged
merged 3 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pkg/controller/signup.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ func (s *Signup) VerifyPhoneCodeHandler(ctx *gin.Context) {

err := s.app.VerificationService().VerifyPhoneCode(ctx, userID, username, code)
if err != nil {
log.Error(ctx, err, "error validating user verification phone code")
e := &crterrors.Error{}
switch {
case errors.As(err, &e):
Expand Down
2 changes: 2 additions & 0 deletions pkg/verification/service/verification_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@
doUpdate := func() error {
signup, err := s.Services().SignupService().GetUserSignupFromIdentifier(userID, username)
if err != nil {
log.Error(ctx, err, fmt.Sprintf("error getting signup from identifier. user_id: %s | username: %s", userID, username))

Check warning on line 324 in pkg/verification/service/verification_service.go

View check run for this annotation

Codecov / codecov/patch

pkg/verification/service/verification_service.go#L324

Added line #L324 was not covered by tests
return err
}

Expand All @@ -342,6 +343,7 @@

_, err = s.Services().SignupService().UpdateUserSignup(signup)
if err != nil {
log.Error(ctx, err, fmt.Sprintf("error updating usersignup: %s", signup.Name))

Check warning on line 346 in pkg/verification/service/verification_service.go

View check run for this annotation

Codecov / codecov/patch

pkg/verification/service/verification_service.go#L346

Added line #L346 was not covered by tests
return err
}

Expand Down
Loading