forked from TrueCloudLab/frostfs-node
[#390] cli: Make tree commands errors and messages more verbose
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
This commit is contained in:
parent
c42db4e761
commit
676a3efa79
8 changed files with 30 additions and 29 deletions
|
@ -1,6 +1,7 @@
|
|||
package tree
|
||||
|
||||
import (
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/internal/common"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/internal/commonflags"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-cli/internal/key"
|
||||
commonCmd "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/internal/common"
|
||||
|
@ -28,15 +29,15 @@ func healthcheck(cmd *cobra.Command, _ []string) {
|
|||
ctx := cmd.Context()
|
||||
|
||||
cli, err := _client(ctx)
|
||||
commonCmd.ExitOnErr(cmd, "client: %w", err)
|
||||
commonCmd.ExitOnErr(cmd, "failed to create client: %w", err)
|
||||
|
||||
req := &tree.HealthcheckRequest{
|
||||
Body: &tree.HealthcheckRequest_Body{},
|
||||
}
|
||||
commonCmd.ExitOnErr(cmd, "message signing: %w", tree.SignMessage(req, pk))
|
||||
commonCmd.ExitOnErr(cmd, "signing message: %w", tree.SignMessage(req, pk))
|
||||
|
||||
_, err = cli.Healthcheck(ctx, req)
|
||||
commonCmd.ExitOnErr(cmd, "rpc call: %w", err)
|
||||
commonCmd.ExitOnErr(cmd, "failed to call healthcheck: %w", err)
|
||||
|
||||
cmd.Println("Success.")
|
||||
common.PrintVerbose(cmd, "Successful healthcheck invocation.")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue