On Apr 12, 2016, at 11:12 AM, Scott Ahten <lightandshado...@gmail.com<mailto:lightandshado...@gmail.com>> wrote:
One idea would be to create an "stack" of errors backed by a mutable array, where the lastError property returns the last error on the stack. In addition, a method could be used to pull the last error off the stack to process it. Basically a FIFO stream of errors. This seems conceptually the same as the notification I proposed, but the notification seems more idiomatic. The userInfo dictionary for each error could contain the ID of the document that caused the error, in addition to indicating the severity of the error, such as if it was fatal, retry-able by the replicator, etc. Definitely. Although with custom properties like these, it starts to seem that these errors should have a custom domain & codes, with the actual network/HTTP/server errors attached via the NSUnderlyingErrorKey. Is this an error that would be retried at some point but CBL, or is it fatal in that some of the data would not have been synced when the replicator went idle? Including this information as part of the userInfo of the error would be very useful. It depends on the type of replication. A one-shot replicator will stop even if some of the documents got errors. A continuous replication will circle back and retry instead of going idle. (This has to do with the goal that a continuous replication is “fire and forget”: it should be able to run forever without intervention.) Underlying this is some lower-level retry logic. If an individual HTTP request fails for a reason that we judge to be temporary, like a socket disconnection or a 50x status, that request will retry several times before giving up and reporting the error up the chain to the replicator. So a truly intermittent error won’t even be visible to you. —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 mobile-couchbase+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/8A8A3208-24BB-4685-81DE-49FE6BDB1638%40couchbase.com. For more options, visit https://groups.google.com/d/optout.