anchor.diff:  make_attachment_stub_receiver(Url, _Headers, _Name, _Type, _Length, 0) ->
       ?LOG_ERROR("streaming attachment request failed after 10 retries: ~s", 
           [Url]),
  -    exit(attachment_request_failed);
  +    exit({attachment_request_failed, ?l2b(["failed to replicate ", Url])});
       
   make_attachment_stub_receiver(Url, Headers, Name, Type, Length, Retries) ->
       %% start the process that receives attachment data from ibrowse
  
positive.code: do_http_request(Url, Action, Headers, JsonBody) ->
      do_http_request(Url, Action, Headers, JsonBody, 10).
  
  do_http_request(Url, Action, _Headers, _JsonBody, 0) ->
      ?LOG_ERROR("couch_rep HTTP ~p request failed after 10 retries: ~s", 
          [Action, Url]),
      exit({http_request_failed, Url});
  do_http_request(Url, Action, Headers, JsonBody, Retries) ->
      ?LOG_DEBUG("couch_rep HTTP ~p request: ~s", [Action, Url]),
      Body =
  
negative.code:     
      JsonResults = case length(Revs) > MaxN of
      false ->
          Url = ?l2b(BaseUrl ++ "&open_revs=" ++ ?JSON_ENCODE(Revs)),
          do_http_request(Url, get, Headers);
      true ->
          {_, Rest, Acc} = lists:foldl(
          fun(Rev, {Count, RevsAcc, AccResults}) when Count =:= MaxN ->
              QSRevs = ?JSON_ENCODE(lists:reverse(RevsAcc)),
              Url = ?l2b(BaseUrl ++ "&open_revs=" ++ QSRevs),
              {1, [Rev], AccResults++do_http_request(Url, get, Headers)};
          (Rev, {Count, RevsAcc, AccResults}) ->
              {Count+1, [Rev|RevsAcc], AccResults}
          end, {0, [], []}, Revs),
          Acc ++ do_http_request(?l2b(BaseUrl ++ "&open_revs=" ++
              ?JSON_ENCODE(lists:reverse(Rest))), get, Headers)
      end,
      
      Results =
  