Skip to content

Commit

Permalink
code review
Browse files Browse the repository at this point in the history
Signed-off-by: squiishyy <[email protected]>
  • Loading branch information
squiishyy committed Oct 18, 2023
1 parent fe4e8ee commit 3838ead
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions flyteadmin/auth/authzserver/metadata_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,8 @@ func (s OAuth2MetadataProvider) GetOAuth2Metadata(ctx context.Context, r *servic
logger.Info(ctx, "retryAttempts: %v retryDuration: %v", s.cfg.AppAuth.ExternalAuthServer.RetryAttempts, s.cfg.AppAuth.ExternalAuthServer.RetryDelayMilliseconds)
response, err := sendAndRetryHttpRequest(httpClient, externalMetadataURL.String(), s.cfg.AppAuth.ExternalAuthServer.RetryAttempts, s.cfg.AppAuth.ExternalAuthServer.RetryDelayMilliseconds.Duration)
if err != nil {
if response != nil {
logger.Errorf(ctx, "Failed to get oauth metadata. Error code: %v. Err: %v", response.StatusCode, err)
return nil, flyteErrors.NewFlyteAdminError(codes.Code(response.StatusCode), "Failed to get oauth metadata.")
}
logger.Errorf(ctx, "Failed to get oauth metadata. Err: %v", err)
return nil, flyteErrors.NewFlyteAdminError(codes.Code(500), "Failed to get oauth metadata.")
logger.Errorf(ctx, "Failed to get oauth metadata. Error code: %v. Err: %v", response.StatusCode, err)
return nil, flyteErrors.NewFlyteAdminErrorf(codes.Code(response.StatusCode), "Failed to get oauth metadata. Err: %v", err)
}

raw, err := ioutil.ReadAll(response.Body)
Expand Down

0 comments on commit 3838ead

Please sign in to comment.