You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/02/01 17:47:38 UTC

[GitHub] tonysun83 commented on a change in pull request #1897: Fix _bulk_docs crash when provided revision can't be parsed

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:
users@infra.apache.org


With regards,
Apache Git Services