Then we don't get a nice error message, that's all

On Wed, 5 Mar 2014, Gregory Farnum wrote:

> 
> In src/mon/OSDMonitor.cc:
> 
> > @@ -3428,6 +3428,11 @@ bool OSDMonitor::prepare_command_impl(MMonCommand *
> m,
> >        err = -EINVAL;
> >        goto reply;
> >      }
> > +    if (type == 0) {
> > +      ss << "type '" << typestr << "' is for devices, not buckets";
> > +      err = -EINVAL;
> > +      goto reply;
> > +    }
> 
> Why are we duplicating the checks, instead of letting the CrushWrapper error
> flow out through the monitor?
> 
> —
> Reply to this email directly or view it onGitHub.[433031__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcwOTY3NzU
> 4MiwiZGF0YSI6eyJpZCI6MjcwNDEyNTd9fQ==--1dde6680c965396e46c554cf669f7be12b23
> ca2f.gif]
> 
> 
>