Chore: Replace go-multierror with errors package (#66432)

* code refactor and type assertions added to tests

* no-lint rule added for specific line
This commit is contained in:
SatVeer Singh
2023-06-19 12:29:45 +03:00
committed by GitHub
parent a75752b085
commit 1bfa3a0f1e
8 changed files with 25 additions and 30 deletions
+2 -3
View File
@@ -6,7 +6,6 @@ import (
"net/http"
"strconv"
"github.com/hashicorp/go-multierror"
"github.com/prometheus/client_golang/prometheus"
"go.opentelemetry.io/otel/attribute"
@@ -143,7 +142,7 @@ func ProvideService(
connector, errConnector := socialService.GetConnector(name)
httpClient, errHTTPClient := socialService.GetOAuthHttpClient(name)
if errConnector != nil || errHTTPClient != nil {
s.log.Error("Failed to configure oauth client", "client", clientName, "err", multierror.Append(errConnector, errHTTPClient))
s.log.Error("Failed to configure oauth client", "client", clientName, "err", errors.Join(errConnector, errHTTPClient))
} else {
s.RegisterClient(clients.ProvideOAuth(clientName, cfg, oauthCfg, connector, httpClient))
}
@@ -201,7 +200,7 @@ func (s *Service) Authenticate(ctx context.Context, r *authn.Request) (*authn.Id
return nil, err
}
authErr = multierror.Append(authErr, err)
authErr = errors.Join(authErr, err)
// try next
continue
}