Azure / Azure/azure-cli

CommandRecommender should be called after the error is shown

Open
#16,361 1 comment 0 reactions 1 assignee Claimed by @houk-ms View on GitHub
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

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.