I am using the StorageAccountsClient to create a new Storage Account. It's working pretty well in most cases. However, in case wrong values are passed e.g. wrong location (uswest instead of westus), the SDK throws an error message of the type:
It would be nice for the SDK to bail out with the actual error message e.g. 400 Bad Request. Invalid Location.
cp := storage.StorageAccountCreateParameters{}
cp.Location = location
cp.Properties.AccountType = t
smc := p.StorageAccountsClient(subID)
smc.PollingMode = autorest.PollUntilDuration
smc.PollingDuration = 15 * time.Minute
sa, err := smc.Create(resGroupName, storageAccountName, cp)
if err != nil {
return nil, err
}
return &sa, nil
Btw: Thanks for adding the ARM support. Cool stuff.