anchor.diff:              {{halt, 400}, Req1, State};
           throw:no_nodes ->
               Msg = <<"at least one node must be supplied">>,
  +            Req1 = wrq:set_resp_body(jiffy:encode({[{<<"error">>, Msg}]}), Req),
  +            {{halt, 400}, Req1, State};
  +        throw:bad_key ->
  +            Msg = <<"invalid key supplied">>,
               Req1 = wrq:set_resp_body(jiffy:encode({[{<<"error">>, Msg}]}), Req),
               {{halt, 400}, Req1, State}
       end.
  
positive.code:         true -> true
      end.
  
  
  parse_post_body(Req) ->
      Body = wrq:req_body(Req),
  
negative.code: % Private stuff
  
  validate_request(Req) ->
      Body = wrq:req_body(Req),
      JobJson = jiffy:decode(Body),
  
      validate_keys(JobJson),
      validate_command(ej:get({<<"command">>}, JobJson)),
      validate_nodes(ej:get({<<"nodes">>}, JobJson)).
  
  validate_command(Command) ->
      case Command of
  