diff --git a/cmd/frostfs-cli/modules/container/create.go b/cmd/frostfs-cli/modules/container/create.go index 10d53a7d8..37827b617 100644 --- a/cmd/frostfs-cli/modules/container/create.go +++ b/cmd/frostfs-cli/modules/container/create.go @@ -185,12 +185,12 @@ func parseContainerPolicy(cmd *cobra.Command, policyString string) (*netmap.Plac return &result, nil } - if err = result.UnmarshalJSON([]byte(policyString)); err == nil { + if err := result.UnmarshalJSON([]byte(policyString)); err == nil { common.PrintVerbose(cmd, "Parsed JSON encoded policy") return &result, nil } - return nil, errors.New("can't parse placement policy") + return nil, fmt.Errorf("can't parse placement policy: %w", err) } func parseAttributes(dst *container.Container, attributes []string) error {