If the replicator can post the reason of why sync gateway reject the doc at 
the same time, It will be better for CBL to handle the conflict depend on 
the error message.


On Thursday, July 16, 2015 at 4:57:59 PM UTC+8, Jonas Schmid wrote:
>
> Posted here: https://github.com/couchbase/couchbase-lite-ios/issues/813
>
> Thanks
>
> On Wednesday, July 15, 2015 at 6:19:53 PM UTC+2, Jens Alfke wrote:
>>
>> Generally it’s assumed that the app and server should agree on 
>> validation, so that the app cannot produce a revision that the server 
>> rejects. In other words, the validation done by the server is to mostly 
>> protect against malicious clients trying to send bad data, and also to 
>> guard against bugs in legitimate apps. 
>>
>> If the app produces a revision the server rejects, it’s in kind of an 
>> awkward state, since the user could have made that change a long time ago 
>> (while offline). It’s a bad UX to have to say “Oh, that edit you saved this 
>> morning? I just realized it’s not valid, so do it over.” The app should 
>> have done its own validation at the point the user pressed Save, and 
>> presented the error then. 
>>
>> But you have a point that, if this did happen, the app might want to know 
>> about it. It would be pretty easy to have the replicator post a 
>> notification. (In general, I think there’s a need to have the replicator 
>> post finer-grained progress information, and this is a part of that.) 
>>
>> Could you file an issue requesting this, please? 
>>
>> —Jens
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/d36c5178-e8ae-491f-a7dd-adac998f56f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to