Merge branch 'master' of https://github.com/dapr/components-contrib into cfqueues-binding

This commit is contained in:
ItalyPaleAle 2022-12-15 14:19:35 -08:00
commit 69084f2d9f
1 changed files with 2 additions and 2 deletions

View File

@ -78,7 +78,7 @@ func CreateContainerStorageClient(log logger.Logger, meta map[string]string) (*c
// Try using shared key credentials first
if m.AccountKey != "" {
credential, newSharedKeyErr := azblob.NewSharedKeyCredential(m.AccountName, m.AccountKey)
if err != nil {
if newSharedKeyErr != nil {
return nil, nil, fmt.Errorf("invalid shared key credentials with error: %w", newSharedKeyErr)
}
client, clientErr = container.NewClientWithSharedKeyCredential(URL.String(), credential, &options)
@ -88,7 +88,7 @@ func CreateContainerStorageClient(log logger.Logger, meta map[string]string) (*c
} else {
// fallback to AAD
credential, tokenErr := settings.GetTokenCredential()
if err != nil {
if tokenErr != nil {
return nil, nil, fmt.Errorf("invalid token credentials with error: %w", tokenErr)
}
client, clientErr = container.NewClient(URL.String(), credential, &options)