mirror of
https://github.com/minio/minio.git
synced 2025-01-22 20:23:14 -05:00
azure: Show better message when credentials are wrong (#9748)
This commit is contained in:
parent
73a308502f
commit
fd0de4ab32
@ -23,6 +23,7 @@ import (
|
||||
"encoding/base64"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
@ -181,6 +182,9 @@ func (g *Azure) NewGatewayLayer(creds auth.Credentials) (minio.ObjectLayer, erro
|
||||
|
||||
credential, err := azblob.NewSharedKeyCredential(creds.AccessKey, creds.SecretKey)
|
||||
if err != nil {
|
||||
if _, ok := err.(base64.CorruptInputError); ok {
|
||||
return &azureObjects{}, errors.New("invalid Azure credentials")
|
||||
}
|
||||
return &azureObjects{}, err
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user