anchor.diff:                      {true, Req,
                        State1#state{couchbeam = S}};
                   {no_authn, Reason} ->
  -                    Msg = bad_auth_message(Reason),
  +                    Msg = error_json(Reason),
                       Json = ejson:encode(Msg),
                       Req1 = wrq:set_resp_body(Json, Req),
                       % TODO This is a needless mutation
  
positive.code: 	    case chef_otto:is_user_in_org(S, UserName, OrgName) of
  		true -> {true, Req1, State1};
  		false ->
  		    Msg = bad_auth_message(not_member_of_org),
  		    Json = ejson:encode(Msg),
                      Req2 = wrq:set_resp_body(Json, Req),
  		    {false, Req2, State1}
  
negative.code:         {true, Req, State#state{organization_guid = OrgGuid, solr_query = Query}}
      catch
          throw:org_not_found ->
              NoOrg = error_json(org_not_found),
              Req1 = wrq:set_resp_body(ejson:encode(NoOrg), Req),
              {false, Req1, State}
      end.
  