CommandRecommender should be called after the error is shown
Open
Error Handling
feature-request
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
## Description
When a command fails, it take **longer** to show the error message than before (without Aladdin) because CLI is querying Aladdin which involves a network request:
```
> az vm disk list
CommandNotFoundError: 'list' is misspelled or not recognized by the system.
Try this: 'az disk list --resource-group '
Still stuck? Run 'az vm disk --help' to view all commands or go to 'https://aka.ms/cli_ref' to learn more
```
## Possible solution
It will be more user-friendly if CLI can show the error message
```
CommandNotFoundError: 'list' is misspelled or not recognized by the system.
```
first and then do the Aladdin query.
Contributor guide
Assessment
This issue has not been assessed yet.