tonysun83 commented on a change in pull request #1897: Fix _bulk_docs crash 
when provided revision can't be parsed
URL: https://github.com/apache/couchdb/pull/1897#discussion_r253130657
 
 

 ##########
 File path: src/couch/src/couch_doc.erl
 ##########
 @@ -275,9 +275,16 @@ transfer_fields([{<<"_revisions">>, {Props}} | Rest], 
Doc, DbName) ->
     true ->
         ok
     end,
-    [throw({doc_validation, "RevId isn't a string"}) ||
-            RevId <- RevIds, not is_binary(RevId)],
-    RevIds2 = [parse_revid(RevId) || RevId <- RevIds],
+    RevIds2 = lists:map(fun(RevId) ->
+        try
 
 Review comment:
   any reason the check isn't  in `parse_revid` given the other `parse_revs` 
also throw errors? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to