Azure / Azure/azure-cli

Worthless error message -- need to fix so it provides actual information

Open
#19,067 2 comments 0 reactions 0 assignees View on GitHub
act-observability-squad Container Instances Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug
This failure was caused because I kicked off CLI to create the container before I put the storage service endpoint in place. It is a worthless error message, and needs to be fixed so the error actually provides guidance to determining what is wrong. Had I not re-run the command a second time when I saw it failed (just for yucks and grins), knowing exactly what I just changed, I would not have realized what caused the issue to begin with.

**Command Name**
`az container create`

**Errors:**
```
'NetworkProfile' object has no attribute 'result'
Traceback (most recent call last):
Temp\pip-unpacked-wheel-pwfpui04\knack\cli.py, ln 233, in invoke
cli\core\commands\__init__.py, ln 659, in execute
cli\core\commands\__init__.py, ln 722, in _run_jobs_serially
cli\core\commands\__init__.py, ln 715, in _run_job
Local\Temp\pip-unpacked-wheel-s5x_2dzp\six.py, ln 703, in reraise
cli\core\commands\__init__.py, ln 693, in _run_job
cli\core\commands\__init__.py, ln 330, in __call__
azure\cli\core\__init__.py, ln 786, in default_command_handler
cli\command_modules\container\custom.py, ln 190, in create_container
cli\command_modules\container\custom.py, ln 348, in _get_vnet_network_profile
AttributeError: 'NetworkProfile' object has no attribute 'result'
```

## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

- _Put any pre-requisite steps here..._
- `az container create --resource-group {} --location {} --name {} --image {} --ports {} --azure-file-volume-account-name {} --azure-file-volume-account-key {} --vnet {} --ip-address {} --subnet {} --azure-file-volume-share-name {} --azure-file-volume-mount-path {}`

## Expected Behavior

## Environment Summary
```
Windows-10-10.0.18362-SP0
Python 3.6.8
Installer: MSI

azure-cli 2.18.0 *

```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.