r0gue-io / pop-cli

An all-in-one tool for Polkadot development.
GNU General Public License v3.0
74 stars 21 forks source link

refactor: error messaging #309

Open AlexD10S opened 2 months ago

AlexD10S commented 2 months ago

As pointed out by @brunopgalvao in his review https://github.com/r0gue-io/pop-cli/pull/306#pullrequestreview-2294202873, some error messages are displayed awkwardly to the user. For example:

┌   Pop CLI : Call a contract
│
◇  Where is your project located?
│  ./
│
◇  Paste the on-chain contract address:
│  5DYs7UGBm2LuX4ryvyqfksozNAW5V47tPbGiVgnjYWCZ29bt
│
└  Unable to fetch contract metadata.
Error: Anyhow error: Cannot infer the root project id

Let's review all commands and ensure the error messages are displayed in a clear and user-friendly manner, customizing them where necessary.