sui icon indicating copy to clipboard operation
sui copied to clipboard

Better error message for config loading failures

Open tufanbarisyildirim opened this issue 2 years ago • 1 comments

I had an old installation and I see that my client.yaml is outdated. The message was something like

Cannot open wallet config file at "/Users/tufan/.sui/sui_config/client.yaml"

This can happen due to various reasons, so I added the root error message now I see that;

➜  sui git:(main) ✗ ./target/debug/sui  client 
Cannot open wallet config file at "/Users/tufan/.sui/sui_config/client.yaml". Error: missing field `envs` at line 2 column 9

and

➜  sui git:(main) ✗ ./target/debug/sui client
Cannot open wallet config file at "/Users/tufan/.sui/sui_config/client.yaml". Error: "Invalid Keypair file \"Invalid bytes\" \"/Users/tufan/.sui/sui_config/sui.keystore\" at line 2 column 9"

for different cases.

I also see the original error is ignored in some other places but I did not want to mess that PR

tufanbarisyildirim avatar Feb 15 '23 12:02 tufanbarisyildirim

The latest updates on your projects. Learn more about Vercel for Git ↗︎

4 Ignored Deployments
Name Status Preview Comments Updated
explorer ⬜️ Ignored (Inspect) Feb 15, 2023 at 0:46AM (UTC)
explorer-storybook ⬜️ Ignored (Inspect) Feb 15, 2023 at 0:46AM (UTC)
frenemies ⬜️ Ignored (Inspect) Feb 15, 2023 at 0:46AM (UTC)
wallet-adapter ⬜️ Ignored (Inspect) Feb 15, 2023 at 0:46AM (UTC)

vercel[bot] avatar Feb 15 '23 12:02 vercel[bot]

it is fixed here: https://github.com/MystenLabs/sui/pull/9696 closing this

tufanbarisyildirim avatar Mar 24 '23 19:03 tufanbarisyildirim