Skip to content

Commit e9b57e1

Browse files
authored
Merge pull request #1277 from jcechace/release-2.13.0-PBM-1660-creds-err-fix
PBM-1660: Passing correct cause error when finding default credentials fails
2 parents 0cecf0d + 00508bc commit e9b57e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pbm/storage/gcs/google_client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ func newGoogleClient(cfg *Config, l log.LogEvent) (*googleClient, error) {
5959
// We only check the credentials type, the scoped used hear doesn't really matter
6060
adc, adcErr := google.FindDefaultCredentials(ctx, storagegcs.ScopeReadOnly)
6161
if adcErr != nil {
62-
return nil, fmt.Errorf("finding default credentials: %w", err)
62+
return nil, fmt.Errorf("finding default credentials: %w", adcErr)
6363
}
6464
adcErr = validateDefaultCredentialType(adc)
6565
if adcErr != nil {
66-
return nil, fmt.Errorf("validate default credential type: %w", err)
66+
return nil, fmt.Errorf("validate default credential type: %w", adcErr)
6767
}
6868
cli, err = storagegcs.NewClient(ctx)
6969
}

0 commit comments

Comments
 (0)