Github user rnewson commented on a diff in the pull request:

    https://github.com/apache/couchdb-chttpd/pull/148#discussion_r86199529
  
    --- Diff: src/chttpd_db.erl ---
    @@ -532,31 +532,40 @@ db_req(#httpd{path_parts=[_,OP]}=Req, _Db) when 
?IS_ALL_DOCS(OP) ->
     db_req(#httpd{method='POST',path_parts=[_,<<"_missing_revs">>]}=Req, Db) ->
         chttpd:validate_ctype(Req, "application/json"),
         {JsonDocIdRevs} = chttpd:json_body_obj(Req),
    -    {ok, Results} = fabric:get_missing_revs(Db, JsonDocIdRevs),
    -    Results2 = [{Id, couch_doc:revs_to_strs(Revs)} || {Id, Revs, _} <- 
Results],
    -    send_json(Req, {[
    -        {missing_revs, {Results2}}
    -    ]});
    +    case fabric:get_missing_revs(Db, JsonDocIdRevs) of
    +        {error, timeout} ->
    --- End diff --
    
    I mean, why only handle the specific timeout error? we only expect an {ok, 
Results} or an {error, Reason} result from fabric:get_missing_revs, anything 
other than those two would be unexpected (and, in the OTP spirit, we would 
write error handling code for them), but it seems reasonable to handle all 
{error, Reason} results.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to