refactor: log errors

This commit is contained in:
Stavros
2025-01-24 18:24:20 +02:00
parent 35854f5ce4
commit f61b6dbad4
6 changed files with 19 additions and 28 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"net/http"
"github.com/rs/zerolog/log"
"golang.org/x/oauth2"
)
@@ -33,7 +32,6 @@ func (oauth *OAuth) GetAuthURL() string {
func (oauth *OAuth) ExchangeToken(code string) (string, error) {
token, err := oauth.Config.Exchange(oauth.Context, code, oauth2.VerifierOption(oauth.Verifier))
if err != nil {
log.Error().Err(err).Msg("Failed to exchange code")
return "", err
}
oauth.Token = token