Azure / Azure/azure-devops-cli-extension
Should not crash when pool-id is given as string by mistake
- Dominant language
- Python
- Stars
- 682
- Forks
- 278
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 3
Description
## Describe the bug
Should not crash when pool-id is given as string by mistake
**Command Name**
`az pipelines agent list
Extension Name: azure-devops. Version: 0.17.0.`
**Errors:**
```
pool_id must be type int.
Traceback (most recent call last):
python3/dist-packages/msrest/serialization.py, ln 693, in serialize_data
return self.serialize_basic(data, data_type, **kwargs)
python3/dist-packages/msrest/serialization.py, ln 739, in serialize_basic
return eval(data_type)(data)
ValueError: invalid literal for int() with base 10: 'some-string'
...
python3/dist-packages/msrest/serialization.py, ln 602, in url
raise TypeError("{} must be type {}.".format(name, data_type))
TypeError: pool_id must be type int.
```
## To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
- `az pipelines agent list --pool-id {}`
## Expected Behavior
Should not crash and should report the error to user
## Environment Summary
```
Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.29
Python 3.8.2
Shell: bash
azure-cli 2.0.81
Extensions:
azure-devops 0.17.0
```
Contributor guide
Assessment
This issue has not been assessed yet.