[#788] cli: Wrap/sync errors

Add context to error messages. Sync error
messages for errors with the same context.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-09-01 19:33:48 +03:00 committed by Alex Vanin
parent ba234699cd
commit 3c848b2cad
5 changed files with 75 additions and 55 deletions

View file

@ -288,6 +288,9 @@ func getSDKClient(key *ecdsa.PrivateKey) (client.Client, error) {
}
c, err := client.New(options...)
if err != nil {
return nil, fmt.Errorf("coult not init api client:%w", err)
}
return c, err
}