anchor.diff:      fetch_org(Server, list_to_binary(OrgName)).
   
   -spec fetch_client(couchbeam:server(), binary() | not_found,
  -                   binary() | string()) -> [tuple()] | not_found.
  +                   binary() | string()) ->
  +                          [tuple()] | {not_found, client}
  +                              | {not_found, org}.
   fetch_client(Server, OrgId, ClientName)
     when is_binary(ClientName), is_binary(OrgId) ->
       ChefDb = [<<"chef_">>, OrgId],
  
positive.code: 
  %% FIXME: do we want to distinguish between client not found and org not found?
  -spec fetch_user_or_client_cert(couchbeam:server(), db_key(), db_key()) ->
      [tuple()] | not_found.
  fetch_user_or_client_cert(Server, OrgName, ClientName)
    when is_binary(OrgName), is_binary(ClientName) ->
      case fetch_user(Server, ClientName) of
          {user_not_found, _} ->
              OrgId = fetch_org_id(Server, OrgName),
              case fetch_client(Server, OrgId, ClientName) of
                  {not_found, What} -> {not_found, What};
                  Client when is_list(Client) ->
                      Cert = ?gv(<<"certificate">>, Client),
                      [{cert, Cert}, {type, client}, {org_guid, OrgId}]
  
negative.code:         {ok, {Row}} ->
              ClientId = ?gv(<<"id">>, Row),
              case couchbeam:open_doc(Db, ClientId) of
                  {error, not_found} -> {not_found, client};
                  {ok, {ClientDoc}} -> ClientDoc
              end;
          {ok, []} -> {not_found, client}
  