diff --git a/os/gcmd/gcmd_command_object.go b/os/gcmd/gcmd_command_object.go index 4957d6cd2..2449a73f0 100644 --- a/os/gcmd/gcmd_command_object.go +++ b/os/gcmd/gcmd_command_object.go @@ -228,7 +228,7 @@ func newCommandFromMethod(object interface{}, method reflect.Value) (command Com // Parameters validation. if err = gvalid.New().Bail().Data(inputObject.Interface()).Assoc(data).Run(ctx); err != nil { - err = gerror.Current(err) + err = gerror.Wrap(gerror.Current(err), `validation failed for command options`) return } inputValues = append(inputValues, inputObject)