How can I be apprised of sync errors? (2.0DB021)

11 views
Skip to first unread message

Ben Kennedy

unread,
Mar 8, 2018, 7:29:42 PM3/8/18
to mobile-c...@googlegroups.com
I've deliberately created a document that will be rejected by Sync Gateway (due to non-conformance to the sync function). With my sync in continuous mode, and the log level pumped up high, I can see the error logged:

2018-03-08 16:24:31.325028-0800 Shoebox[7768:21175929] CouchbaseLite Sync ERROR: {2} Got error response to rev biz.1234567890 #2-da774235e8a37f9e803bb687362be1f6648ff22e (seq 52): HTTP 403 'missing channel access'

However, I can't figure out how to get notified about it.

In my replicator change listener, I'm checking `change.status.error`, but it is always nil. The sync activity continues to run as expected between `busy` and `idle`, but never becomes `stopped`.

What am I overlooking?

thanks,

-b

Jens Alfke

unread,
Mar 8, 2018, 8:24:45 PM3/8/18
to Couchbase Mobile


On Mar 8, 2018, at 4:29 PM, Ben Kennedy <ben.k...@kashoo.com> wrote:

However, I can't figure out how to get notified about it.

Yeah, there isn’t a notification. :( I’m sure there’s an issue pending to add one, but it hasn’t been a high priority because, in general, clients shouldn’t be creating documents that fail server validation. (For example, if the server requires a “price” property, and the app doesn’t add one, that’s an app bug.) But I know there are exceptions where a document could be unexpectedly rejected; it just hasn’t surfaced as a high priority to handle yet.

—Jens

Jens Alfke — Mobile Architect — Couchbase, Inc.

Reply all
Reply to author
Forward
0 new messages