azure-devops-cli-extension
azure-devops-cli-extension copied to clipboard
Should not crash when pool-id is given as string by mistake
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