diff --git a/internal/services/user_service.go b/internal/services/user_service.go index dc875fe..201342c 100644 --- a/internal/services/user_service.go +++ b/internal/services/user_service.go @@ -132,6 +132,10 @@ func (usrSrv *userService) Register(userRegistrationRequest models.UserRegistrat return false, err } tx, err := usrSrv.db.Begin() + if err != nil { + log.Println("Failed to start transaction") + return false, ErrRegistration + } defer tx.Rollback() queryString := ` INSERT INTO users