Skip to content

Commit

Permalink
Merge pull request #13 from cloudfoundry-community/fix-wrongly-error-…
Browse files Browse the repository at this point in the history
…handling

fix wrong error handling
  • Loading branch information
gmllt authored Jun 12, 2024
2 parents 1b352b2 + ec71d05 commit 168d91d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down

0 comments on commit 168d91d

Please sign in to comment.