From ec71d057c76eb6a4a56c12d5b8ed657134127a25 Mon Sep 17 00:00:00 2001 From: Gilles Miraillet Date: Wed, 12 Jun 2024 16:35:03 +0200 Subject: [PATCH] fix wrong error handling --- session.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/session.go b/session.go index 5030c59..14ecb25 100644 --- a/session.go +++ b/session.go @@ -146,10 +146,7 @@ func (s *Session) init(config *configv3.Config, configUaa *configv3.Config, conf // create an uaa client with cf_username/cf_password or client_id/client secret // to use it for authenticate requests uaaClient := uaa.NewClient(config) - if _, err := uaaClient.GetAPIVersion(); err != nil { - return fmt.Errorf("unable to get API version: %s", err) - } - + _, _ = uaaClient.GetAPIVersion() uaaAuthWrapper := uaaWrapper.NewUAAAuthentication(nil, configUaa) uaaClient.WrapConnection(uaaAuthWrapper) uaaClient.WrapConnection(uaaWrapper.NewRetryRequest(config.RequestRetryCount()))