Azure / Azure/azure-rest-api-specs

Bad Error Message: 'NoneType' object has no attribute when --resource-group or --name is misspelled

Open
#6,719 2 comments 0 reactions 0 assignees View on GitHub
Service Attention Web Apps
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 37m
Merged PRs (30d)
446

Description

**Describe the bug**
`az webapp identity show --resource-group "mispelledgroup" --name "somename"` with a bad resource group or name field and returns a `'NoneType' object has no attribute 'identity'` error. In general it seems that when using `az webapp` if there is anything wrong with the `--resource-group` or `--name` flags it will return a `'NoneType' object has no attribute` error message.

**To Reproduce**
Run `az webapp identity show` with bad --resource-group or --name fields.

**Expected behavior**
A clear and actionable error message.

**Environment summary**
MSI, azure-cli (2.0.54), windows 10

Contributor guide

Open the contributing guide

Research direction

Reproduce `az webapp identity show` with misspelled `--resource-group` and `--name` values, then trace the command's error handling. Done means the command reports a clear, actionable error instead of a `'NoneType' object has no attribute 'identity'` message.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.