From af72412b77646e8ad93950d25ae0d5d5ad6bfb38 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Mon, 21 Jun 2021 00:44:26 +0300 Subject: [PATCH] [#624] cli/object: Fix error messages Signed-off-by: Pavel Karpy --- cmd/neofs-cli/modules/object.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/neofs-cli/modules/object.go b/cmd/neofs-cli/modules/object.go index a885aab6b9..d7115fcc08 100644 --- a/cmd/neofs-cli/modules/object.go +++ b/cmd/neofs-cli/modules/object.go @@ -361,7 +361,7 @@ func getObject(cmd *cobra.Command, _ []string) error { return nil } - return fmt.Errorf("can't put object: %w", err) + return fmt.Errorf("can't get object: %w", err) } if filename != "" { @@ -410,7 +410,7 @@ func getObjectHeader(cmd *cobra.Command, _ []string) error { return nil } - return fmt.Errorf("can't put object: %w", err) + return fmt.Errorf("can't get object header: %w", err) } return saveAndPrintHeader(cmd, obj, cmd.Flag("file").Value.String()) @@ -444,7 +444,7 @@ func searchObject(cmd *cobra.Command, _ []string) error { )..., ) if err != nil { - return fmt.Errorf("can't put object: %w", err) + return fmt.Errorf("can't search object: %w", err) } cmd.Printf("Found %d objects.\n", len(ids)) for _, id := range ids { @@ -492,7 +492,7 @@ func getObjectHash(cmd *cobra.Command, _ []string) error { )..., ) if err != nil { - return fmt.Errorf("can't get object: %w", err) + return fmt.Errorf("can't get object header: %w", err) } switch typ { case hashSha256: