nickva commented on a change in pull request #3909:
URL: https://github.com/apache/couchdb/pull/3909#discussion_r795880151
##########
File path: src/fabric/src/fabric_doc_update.erl
##########
@@ -157,7 +163,12 @@ force_reply(Doc, [FirstReply | _] = Replies, {Health, W,
Acc}) ->
false ->
CounterKey = [fabric, doc_update,
mismatched_errors],
couch_stats:increment_counter(CounterKey),
- {error, W, [{Doc, FirstReply} | Acc]}
+ case check_forbidden_msg(Replies) of
+ {forbidden, Msg} ->
+ {Health, W, [{Doc, {forbidden, Msg}} |
Acc]};
+ false ->
+ {error, W, [{Doc, {mismatched_errors,
Replies}} | Acc]}
Review comment:
I wonder if this would break anything since we previously returned a
reply but now return the `mismatched_errors` tuple. The `mismatch_errors` is
more clear, of course, but it could also break some json serialization of these
errors for that doc (if we know how to serialize a reply error shape but not
`{mismatched_errors, [_| _] = Replies}` or when we update a single doc with
`update_doc(...)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]